1 / 19

Topics

Topics. To define XML as a technology To place XML in the context of system architectures Online support: http://www.w3schools.com/xml/default.asp Online community: http://www.oasis-open.org/home/index.php Standards development: http://www.oasis-open.org/committees/committees.php#completed.

elias
Download Presentation

Topics

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Topics • To define XML as a technology • To place XML in the context of system architectures Online support: http://www.w3schools.com/xml/default.asp Online community: http://www.oasis-open.org/home/index.php Standards development: http://www.oasis-open.org/committees/committees.php#completed CIS 340

  2. Spectrum of “Technologies” DTD XPATH XSD XML XQUERY XSL XSLT XLINK XFORMS XSL-FO XPOINTER CIS 340

  3. XML • XML stands for eXtensible Markup Language. • XML is designed to transport and store data. • XML is important to know, and very easy to learn. CIS 340

  4. XML ... • Is a syntax for describing data • Almost any data • Produces “vocabularies” • Anyone can produce an individualized vocabulary • Sharing the vocabulary enables the sharing of data Organizational hub • http://www.xml.org/ CIS 340

  5. XML History • Shares similar historical roots with HTML • Part of SGML (Standard Generalized Markup Language – 1970s) • HTML describes how to render information via a browser • “rendering” options are fixed via the language • Display potential fixed via the selected output technology HTML limitation? • Interpretation after transmission (e.g. use) requires human intervention CIS 340

  6. A-WEB FINANCIAL.rpt COMPANY B COMPANY A XML History (p. 2) • If XML used, Company B can: • Have programs manipulate data • Import data directly to database • Store immediately within similar, affiliated documents • Manipulate data for specific needs • continues.... • XML enables human bypass • XML offers self-descriptive labels equating to interpretation • XML provides “meta information” CIS 340

  7. Def: Vocabularies • Collection of elements • Not predefined • But related into a structure  vocabulary • “Instance of”  XML document CIS 340

  8. Accounting XML Advertising XML Astronomy XML Building XML Chemistry XML Construction XML Education XML Food XML Finance XML Government XML Healthcare XML Human Resources XML Instruments XML Insurance XML Legal XML Manufacturing XML News XML Photo XML Physics XML Publishing XML Real Estate XML Telecommunications XML Travel XML Sample Defined Vocabularies (in progress) CIS 340

  9. EX: Address Vocabulary Contents of the files? .../xml/... CIS 340

  10. Prolog (optional) Describes the xml-specification Declares the document type (DTD) Body (required) collection of instantiated vocabulary terms Epilog (optional) processing or comments <?xml version = 1.0”?> <!DOCTYPE book SYSTEM “book.dtd”> <book category = “FICTION”> <title>Golden Phoenix</title> <author>J. K. Rowling</author> </book> <book category = “NON-FICTION”> <title>Mythical Work</title> <author>E. Yourdan</author> </book> XML Document CIS 340

  11. Schemas • Document Type Definition (DTD) • XML Schema Definition (XSD) • Offers the legal structure of the elements of a vocabulary • Enables the programmatic access of an XML “document” • Meaning? • Declare element types • Qualify elements with attributes • Define parent-child relationships • Assign simple data types • Establish validation basis for data acceptance CIS 340

  12. DTD !DOCTYPE note defines that the root element of this document is note !ELEMENT note defines that the note element contains four elements: to,from,heading,body" !ELEMENT to defines the to element  to be of type "#PCDATA" !ELEMENT from defines the from element to be of type "#PCDATA" !ELEMENT heading defines the heading element to be of type "#PCDATA" !ELEMENT body defines the body element to be of type "#PCDATA" CIS 340

  13. EX: DTD Specification <!DOCTYPE book [ <!ELEMENT book (title, author)> <!ATTLIST book CATEGORY (Fiction |Non-Fiction)> <!ELEMENT title (#PCDATA)> <!ELEMENT author (#PCDATA)> ]> CIS 340

  14. address example <?xml version = “1.0”?> <xsd:schema xmlns:xsd= http://www.w3.org/2001/XMLSchema> <xsd:element name=“book”> <xsd:complexType> <xsd:sequence> <xsd:element name=“title” type “xsd:string”/> <xsd:element name=“author” type “xsd:string”/> </xsd:sequence> <xsd:attribute name = “category”> <xsd:simpleType> <xsd:restriction base=“xsd:string”/> <xsd:enumeration value = “Fiction”/> <xsd:enumeration value = “Non-Fiction”/> </xsd:restriction> </xsd:simpleType> </xsd:attribute> </xsd:complexType> </xsd:element> </xsd:schema> EX: XSD Specification(see p. 29)

  15. XQUERY ... FLWR (“flower”) • Query language • aka SQL • Designed for XML documents • Allows for logic to be used to access embedded information of XML documents CIS 340

  16. XQUERY ... FLWR (“flower”) FLWR :: For Let Where Return General versions: for Variable in Exp where Exp return Exp sortby(Exp) let Variable := Exp where Exp return Exp sortby(Exp) for $x in document (“books.xml”) // book where $x/author = “J. K. Rowling” return $x/title gives<title>Golden Phoenix</title> CIS 340

  17. XSLT XML Stylesheet Language Transformations Mechanism for taking XML documents to different output renditions XPATH Collection of “utility functions” Enables the parsing and traversing of XML structures Required mechanism for XSLT and XQUERY Not defined via an XML-compliant syntax Most XML languages are Connective Languages CIS 340

  18. Highlights CIS 340

  19. Next

More Related