210 likes | 506 Views
Advantages of XML. Installed base of HTML, HTTP and webbrowsers XML is simple and portable XML can describe documents of any complexity XML is more than just a markup language („XML family“) XML is international. What will XML be used for?.
E N D
Advantages of XML • Installed base of HTML, HTTP and webbrowsers • XML is simple and portable • XML can describe documents of any complexity • XML is more than just a markup language („XML family“) • XML is international
What will XML be used for? • Messaging („database interchange“): XML as standardized format for data exchange (e.g.: XML/EDI) • Processing („Distributed processing: giving Java something to do“): Reallocation from server to client (e.g.: Electronic Banking, Electronic Commerce) • Publishing („View selection: letting the user decide“): Variable presentation of information • Publishing in different formats with XSL (FAQ problem) • Automated publishing (e.g. from databases) • Retrieval („Web agents: data that knows about me“): Intelligent search for information
Applications: XML/EDI • XML as messaging format between heterogeneous systems • Documents use an industry standard DTD • This DTD is publicly made available in a repository • Thus, documents can be validated and processed by any receiving application • Different approach: Well-formed XML-douments/Schemas
Applications: XML/EDI traditional EDI relationship: Only profitable in long term, high volume transactions XML/EDI: Propensity to invest in compatible and open IT-infrastructures especially for SMEs at any stage of a supply chain is higher („white elephants“) Datastream provided by an XML parser is easy to process by different applications. XML-coded data is easily adjustable to the heterogeneous needs of different applications and media. XML enables the definition of open and flexible interfaces. Advantages associated with XML (simple, flexible, works with existing products and legacy systems) are the foundation of the XML/EDI-Group‘s E-Business-Framework.
Applications: XML/EDI • ANSI ASC X12 (Namensvergabe, Hierarchien/Schachtelungen etc.) • DIN/Nbü und dedig (Norm-Entwurf DIN 16557-4) • UN/CEFACT (EC XML Initiative mit OASIS, simpl-EDI, oo-EDI) • ebXML (seit Nov. 1999, UN/CEFACT, OASIS...) • CEN/ISSS und EBES • XML/EDI-Group (Migration mit 100% Rückwärtskompatibilität) • OASIS, commerceNet, cXML, rosettaNet, BizTalk (Microsoft)... • ...
Applications: XML/EDI UNH+ELFE0000001+INVOIC:D:95A:UN:ETEB+1:C’ <elfe_segment name="message header" zweck="Beginn der Telekom-Rechnung" elfe="UNH"> <elfe_0062>ELFE0000001</elfe_0062> <elfe_S009> <elfe_0065>INVOIC</elfe_0065> <elfe_0052>D</elfe_0052> ........ </elfe_S009> ................. </elfe_segment> UNH + ELFE0000001 + INVOIC:D... ... <UNH D0062=" ELFE0000001” S009D0065=" INVOIC” S009D0052=“D”............/>
Applications: Processing Because all document data can be coded in XML all information required for processing the document can be transmitted (possibly with a Java program) and processed on the client-side („server independent documents“). Shift of processing time from server to client reduced network load Combination of Java and XML!!!
Applications: Publishing • Different „views“ on XML-documents depending on purpose („Publish once“): • Software documentation: Only the relevant operating system • Different display/printing format • Tables of Content generated at run-time • Different use of footnotes etc. in documents • Sorting (phone books...) by name, number, e-mail... • Personalized product catalogs from distributed data sources • ...
Applications: Retrieval „Information needs to know about itself, and information needs to know about me” (Jon Bosak) • Intelligent software agents can understand the meaning of XML-coded information better description of websites and products • Problem of too many hits in search engines (homonyms and synonyms) • Personalized TV Guide • ..... • In general, structured (meta-)data is the basis for an individual usage of mass media/mass data on networks.
Applicatons Already, hundreds of languages have been described in XML and every day there are dozens of new XML-aplications: http://www.oasis-open.org/cover/xml.html • CML (Chemical Markup Language), Exchange and description of molecules etc. • FinXML (digital language for capital markets) • BSML (Bioinformatic Sequence Markup Language)„public domain protocol for Graphic Genomic Displays“ • OMF (Weather Observation Markup Format) (OMF) • MML (Mathematical Markup Language) • WAP (Wireless Markup Language) • CDF (Channel Definition Format) used for push channels in MSIE • OTP, Framework for E-Commerce • XHTML • SpeechML (IBM) „for building distributed network-based conversational applications“ • ThML (Theological Markup Language) • .............
XML Schema Working Group at W3C • The formal definition of a document type can be described in a DTD. But there are serious drawbacks. That is why the W3C is developing schemas for constraining document structure in a more sophisticated way. Schemas are valid XML documents ( navigation!) • Specific goals of schemas beyond DTD functionality are among others: • definition of incomplete constraints on the content of an element type, open content models • extended data typing (>30: integers, dates); byte sequences ("binary data") also need to be considered • inheritance • Extended structural specifications (e.g. minOccur, maxOccur) • Equivalent field definitions (e.g.: element PREIS = element PRICE)
XML-Data • XML-Data is one of four schema submissions to W3C • XML-Schema implementation in IE 5 is a subset of XML-Data • Definition of a schema in top-level SCHEMA document element derived from namespace: xmlns="urn:schemas-microsoft-com:xml-data • It is useful to make the schema-namespace the default namespace • The schema-element should contain all other namespace declarations, e.g. the namespace defining data types <Schema name="myschema" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes"> <!-- ... --> </Schema>
XML Schemas <!DOCTYPE ARTICLE [ <!ELEMENT ARTICLE (AUTHOR, TITLE+)> <!ELEMENT AUTHOR (#PCDATA)> <!ELEMENT TITLE (#PCDATA)> ]>
XML Schemas <?xml version="1.0"?> <Schema name="schema_sample_1" xmlns="urn:schemas-microsoft-com:xml-data" xmlns:dt="urn:schemas-microsoft-com:datatypes"> <ElementType name=“TITLE" content="textOnly" model="closed"/> <ElementType name=“AUTHOR" content="textOnly" model="closed"/> <ElementType name=“ARTICLE" content="eltOnly" model="closed"> <element type=“TITLE" minOccurs="1" maxOccurs="*"/> <element type=“AUTHOR" minOccurs="1" maxOccurs="1"/> </ElementType> </Schema>
XML Schemas - content model A schema content model is open by default. This means that apart from explicitly declared elements additional elements can be used extensibility The content model can be closed by using the model attribute. <Schema xmlns="schemas-microsoft-com:xml-data"> <ElementType name=“article" model="closed"/> <element type=“title" /> <element type=“author" /> </ElementType> </Schema>
XML Schemas - data types Schemas allow the definition of data types ( type validation) <ElementType name="pages"> <datatype dt:type="int" /> </ElementType> While validating the data types are checked. Since schemas use an open content model, applications can check for additional information: <ElementType name="pages" xmlns:myExt="urn:myschema-extensions"> <datatype dt:type="int" /> <myExt:min>50</myExt:min> <myExt:max>100</myExt:max> </ElementType>
XML-Data • Principal XML Schema elements include ElementType (which declares element types) and AttributeType (which declares attribute types). • These elements must have an explicit name attribute unique within the schema. • The element and attribute elements can appear within the ElementType element to constrain the content and attributes that can appear in elements of the named type. • The ElementType attributes order and group allow you to further establish fine-grained definitions. • The minOccurs and maxOccurs attributes allow you to define the number of occurrences of an element or group. • The content for an element of a given element type can be defined as one of four categories: empty (no content), text only, subelements only, or a mix of text and subelements. • This choice is expressed in the ElementType attribute named content, which can take the values "empty," "textOnly," "eltOnly," and "mixed," respectively.
W3C schema scenarios • Publishing and syndication: Structural schemas describe the properties of headlines, news stories, thumbnail images, cross-references, etc. Document views under control of different versions of a schema. • Electronic commerce transaction processing: Libraries of schemas define business transactions within markets and between parties. • Supervisory control and data acquisition: Provide transparency control. Applications include media devices, security systems, plant automation, process control. • Traditional document authoring/editing governed by schema constraints: Guide an author in the development of documents (e.g. a memo, a more sophisticated example is the technical service manuals for a wide-body intercontinental aircraft). The application can ensure that the author always knows whether to enter a date or a part-number, and might even ensure that the data entered is valid. • Use schema to helpquery formulation and optimization: A query interface inspect XML schemas to guide a user in the formulation of queries. Any given database can emit a schema of itself to inform other systems what counts as legitimate and useful queries. • Open and uniform transfer of data between applications, including database: XML has become a widely used format for encoding data for exchange between loosely coupled applications. Such exchange is currently hampered by difficulties of fully describing the exchange data model (EDM) with XML DTDs; EDM versioning issues further complicate such interactions. When the EDM is represented by the more expressive XML Schema definitions, the task of mapping the exchange data model to and from application internal data models will be simplified. • Metadata Interchange: There is growing interest in the interchange of metadata (especially for databases) and in the use of metadata registries to facilitate interoperability of database design, DBMS, query, user interface, data warehousing, and report generation tools. Examples include ISO 11179 and ANSI X3.285 data registry standards, and OMG's proposed XMI standard.