110 likes | 205 Views
IS400: Development of Business Applications on the Internet Fall 2004 Instructor: Dr. Boris Jukic. XML. XML (Extensible Markup Language). Derived from Standard Generalized Markup Language (SGML) Open technology for electronic data exchange and storage
E N D
IS400: Development of Business Applications on the InternetFall 2004Instructor: Dr. Boris Jukic XML
XML (Extensible Markup Language) • Derived from Standard Generalized Markup Language (SGML) • Open technology for electronic data exchange and storage • Create other markup languages to describe data in structured manner • XML documents • Contain only data, not formatting instructions • Highly portable, needs only an XML parser (built-in in IE, other browsers) • Document Type Definition (DTD, schema) • XML document can reference another that defines proper structure • XML-based markup languages • XML vocabularies
XML Vocabularies • XSL (Extensible Stylesheet Language) • MathML (Mathematical Markup Language) • SVG (Scalable Vector Graphics) • WML (Wireless Markup Language) • XBRL (Extensible Business Reporting Language) • Chemical Markup Language (CML) • Really Simple Syndication (RSS)
XML Namespaces • XML allows document authors to create custom elements • Possible problem of Naming Collisions In an airline industry document: <capacity> 100</capacity> may refer to number of passengers allowed in an airplane In office equipment industry: <capacity> 100 <capacity> may refer to number of sheets that can be fed in a printer/copier What if a document is created that contains information about both items • Solution: XML namespace: (see the Namespace tutorial) • Collection of element and attribute names • Uniform resource identifier (URI) • Uniquely identifies the namespace • A string of text for differentiating names
Document Type Definitions (DTDs) and Schemas • Two types of documents for specifying XML document structure • Document Type Definition (DTDs) • Schemas
Document Type Definitions • Enables XML parser to verify whether XML document is valid • Allow independent user groups to check structure and exchange data in standardized format • Expresses set of rules for structure using so called “EBNF grammar” • ELEMENT type declaration • Defines rules • ATTLIST attribute-list declaration • Defines an attribute
W3C XML Schema Documents • Schemas • Specify XML document structure • Do not use EBNF grammar • Use XML syntax • Can be manipulated like other XML documents • Require validating parsers • XML schemas • Schema vocabulary the W3C created • Recommendation • Schema valid • XML document that conforms to a schema document • Use .xsd extension
XML Vocabularies • XSL (Extensible Stylesheet Language) • MathML (Mathematical Markup Language) • SVG (Scalable Vector Graphics) • WML (Wireless Markup Language) • XBRL (Extensible Business Reporting Language) • Chemical Markup Language (CML) • Really Simple Syndication (RSS)
Extensible Stylesheet Language (XSL) • Think of XSL as a set of languages that can • transform XML into XHTML, • filter and sort XML data • define parts of an XML document, • format XML data based on the data value, like displaying negative numbers in red, and • output XML data to different media, like screens, paper, or voice.