1 / 39

XML An Introduction

XML An Introduction. February 27th 2001 brian thompson design.interpretive Nortel Networks. XML Adoption. XML Alphabet Soup. What is XML?. e X tensible. M arkup. L anguage. Extensible Unlike HTML, XML provides the tools to create new markup vocabularies or extend existing ones Markup

paki-peters
Download Presentation

XML An Introduction

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. XML An Introduction February 27th 2001 brian thompson design.interpretive Nortel Networks

  2. XML Adoption

  3. XML Alphabet Soup

  4. What is XML? eXtensible Markup Language • Extensible • Unlike HTML, XML provides the tools to create new markup vocabularies or extend existing ones • Markup • Descriptive markup scheme based on generic identifiers used to assign names to logical units of content • Language • The grammar to be used in describing document structures where documents are any form of human communication

  5. XML adapts with change Fixed System Variable System Limited Access / Limited Use Wide and Variable Access Stable Organizational Boundaries Variable Organizational Boundaries Rigid Processes Multiple Dynamic Processes Tight Control Limited Control Limited Flexibility Infinite Flexibility Closed Systems Open Systems

  6. XMLAn XML Document can take the form of self-documented Data Structure <?XML version=“1.0” encoding=“UTF-8” standalone=“yes” ?> <!DOCTYPE invoice [ <!ELEMENT invoice (to, from, po, amount) > <!ELEMENT to (#PCDATA) > <!ELEMENT from (#PCDATA) > <!ELEMENT po (#PCDATA) > <!ELEMENT amount (#PCDATA) ><!ATTLIST amount currency (USD,CA, EURO) #REQUIRED > ]> <invoice> <to>Packet Components</to> <from>Switches Unlimited</from> <po>KN00123A-2000</po> <amount currency=“USD”>14,599.00</amount> </invoice> Declared Structural Rules govern Document Content

  7. XML and SGML SGML SGML(1986): Standard Generalized Markup Language XML “XML is a simplified subsetof SGMLspecially designedfor Web Applications” Jon Bosak, Father of XMLSun Microsystems DSSSL HyTime XML(1998): Extensible Markup Language CALS Tables& FOSI XSL XSLT XHTML XML Schema HTML XLink XPath XPointer Namespaces

  8. The XML Universe Markup Languages: Vocabularies VoiceML XHTML MathML SMIL SVG WML Semantic Web: XML Foundation RosettaNet HL7 XSL (Display) XSLT(Transform) XLink(Relate) OFX BizTalk XPath(Address) XPointer(Address) XQuery(Address) XMI ebXML XML Schema(Describe) Namespaces(Classify) SGML(1986): Standard Generalized Markup Language XML(1998): Extensible Markup Language

  9. XML version Processing Instruction XML Declaration UCS Transformation Format <?XML version=“1.0” encoding=“UTF-8” standalone=“no” ?> UCS - Universal Character Set

  10. Document Type Declaration <!ELEMENT TESTSUITE (TESTCASES+)> <!ATTLIST TESTSUITE PROFILE CDATA #IMPLIED > <!ELEMENT TESTCASES (TEST|TESTCASES)*> <!ATTLIST TESTCASES PROFILE CDATA #IMPLIED > <!ELEMENT TEST (#PCDATA | EM | B)*> <!ATTLIST TEST URI CDATA #REQUIRED ID ID #REQUIRED TYPE (valid|invalid|not-wf|error) #REQUIRED > Document Type External Subset Internal Subset Document Type DeclarationGrammar for a class of documents <!DOCTYPE TESTSUITE SYSTEM "testcases.dtd" [ ]>

  11. Document Type DefinitionsRules that govern a class of documents <!ELEMENT TESTSUITE (TESTCASES+)> <!ATTLIST TESTSUITEPROFILE CDATA #IMPLIED > <!ELEMENT TESTCASES (TEST|TESTCASES)*> <!ATTLIST TESTCASESPROFILE CDATA #IMPLIED > <!ELEMENT TEST (#PCDATA | EM | B)*> <!ATTLIST TEST URI CDATA #REQUIRED ID ID #REQUIRED TYPE (valid|invalid|not-wf|error) #REQUIRED > DTD for a Class of Documents testcases.dtd Governs <?xml version="1.0"?> <!DOCTYPE TESTSUITE SYSTEM "testcases.dtd" [ ]> <TESTSUITEPROFILE="OASIS Conformance Tests, v1.0"> <TESTCASES PROFILE="Sun Microsystems XML Tests"> <TESTURI "valid/dtd00.xml" ID="dtd00" TYPE="valid"> Tests parsing of alternative forms of text-only mixed content declaration.</TEST> </TESTCASES> </TESTSUITE> Document Instance testcase1a.xml

  12. The XML FamilyXML Implementation Components Semantic Web: XML Foundation Application XSL (Display) XSLT(Transform) XLink(Relate) Core Functions XPath(Address) XPointer(Address) XQuery(Address) Retrieval Services XML Schema(Describe) Namespaces(Classify) Enhanced Naming XML(1998): Extensible Markup Language Basic Grammar

  13. XSLXML Implementation Components • Extensible Stylesheet Language (XSL) <xsl:template match="name"> <p style="font-size : smaller; margin-top : 0; margin-bottom: 0"> <a target="summary"> <xsl:attribute name="href"> <xsl:value-of select="@xlink:href"/> </xsl:attribute> <xsl:value-of select="@xlink:title"/> </a> </p> </xsl:template> Example: W3C XSL Spec

  14. XSL

  15. XSLTXML Implementation Components • XSL Transformations (XSLT) <xsl:template match="facepage"> <xsl:if test="/toc/@language[.='en']"> <p class="toc_contents">CONTENTS</p> <p class="toc_date"> <xsl:value-of select="@day-name"/>, <xsl:value-of select="@month"/> <xsl:value-of select="@day"/>, <xsl:value-of select="@year"/> </p>...

  16. XSLT

  17. XLinkXML Implementation Components • XML Linking Language (XLink) <my:crossReference xmlns:my="http://example.com/" xmlns:xlink="http://www.w3.org/1999/xlink" xlink:type="simple" xlink:href="students.xml" xlink:title="Student List" xlink:actuate="onRequest"> Current List of Students </my:crossReference>

  18. Xlink

  19. XPathXML Implementation Components • XML Path Language (XPath) child::* selects all element children of the context node child::para[position()=last()] selects the last para child of the context node child::para[position()=last()-1] selects the last but one para child of the context node

  20. Xpath example - PO

  21. XQueryXML Implementation Components • XML Query language string-range(//title,”Yuri Rubinsky")[17] Returns the 17th occurrence of “Yuri Rubinsky” within a Title Element

  22. XML SchemaXML Implementation Components • XML Schema (Structures and Datatypes) <ElementType name = "primaryKey" content = "eltOnly" order = "seq"> <AttributeType name = "name" dt:type = "string" required = "yes"/> <AttributeType name = "linkName" dt:type = "id" required = "yes"/> <AttributeType name = "enabled" dt:type = "enumeration" dt:values = "yes no" required = "yes"/> <attribute type = "name"/> <attribute type = "linkName"/> <attribute type = "enabled"/> <element type = "columnLink" minOccurs = "1" maxOccurs = "*"/> </ElementType>

  23. NamespacesXML Implementation Components • XML Namespaces <x xmlns:edi='http://ecommerce.org/schema'><edi:price units='Euro'>32.18</edi:price></x> The namespace for the element price is http://ecommerce.org/schema

  24. Server VoiceXML InterpreterContext Interpreter Platform VoiceXML • Voice Extensible Markup Language • Designed for creating audio dialogs with synthesized speech and speech recognition • Web enabling interactive voice response applications <?XML version=“1.0”?> <vxml version=“1.0”> <form><field name=“drink”> <prompt>Coffee or Tea?</prompt> <grammar src=“drink.gram” type=“application/x-jsqf”/></field> <block><submit next=“http://www.drink.com” /> </block></form> </vxml>

  25. WML • Wireless Markup Language <?XML version=“1.0”?> <wml> <card id=“abc” ordered=“true”> <p><do type=“accept”><go href=“http://www.xyz.org” /></do> X: $(X)<br/> Y: $(&#59:)<br/> Enter Name: <input type=“text” name=“N” /> </p></card></wml>

  26. WML WML allows for content to accessed from a low bandwidth (14.4kb) wireless device

  27. RosettaNet • Technology Supply Chain Integration • Provides a methodology for building interchange solutions

  28. RosettaNet Every partner speaks the same language

  29. SVG • Scalable Vector Graphics • A language for describing 2-dimensional graphics in XML • (vector graphic shapes, graphics animation, images and text (XML)) <?xml version="1.0" standalone="no"?> <!DOCTYPE svg SYSTEM "http://www.w3.org/TR/2000/CR-SVG-20001102/DTD/svg-20001102.dtd"> <svg width="5cm" height="5cm"> <desc>Two groups, each of two rectangles</desc> <g id="group1" style="fill:red"> <rect x="1cm" y="1cm" width="1cm" height="1cm" /> <rect x="3cm" y="1cm" width="1cm" height="1cm" /> </g> </svg>

  30. SVG example – Moscow Network Zoom in and out without loss of detail Add or remove elements to filter image

  31. SVG example – Tiger Zoom Graphic can be sent to any device

  32. ICE • Information and Content Exchange(ICE) • Creates a common language and protocol for the automatic exchange of content assets • Integrating web assets from the perspective of users: • Individual and corporate consumers • Syndication Service Providers (Web Superstores) • Content Developers and Owners • Designed around a set of specific transactions were content is either sold, resold or licensed. <ice-response request-id="1998-07-05T02:03:45@nr3.com-1" > <ice-code numeric="200" phrase="OK" message-id="1998-08-11T12:34:56@xyz.com-1" ></ice-code> </ice-response>

  33. ICE example The subscriber is authorized to receive content based on a micro-transaction or subscription

  34. XML Routing Hardware

  35. XML Designing with XML February 27th 2001 brian thompson design.interpretive Nortel Networks

  36. Language and XML • Languages: • Encode meaning • Transmit through a context • Are decoded at the other end • XML: • Explicitly declares meaning • Can be altered in transmission • Can be understood by people and machines

  37. Designing with XML and XSL • Pairing the content with the filter creates opportunity • What collection of content gives the best opportunities for interpretation? • What collection of features produces the most dynamic mix? • What interplay of XML documents reveals opportunities? • How many ways can you look at the various combinations? • Using multiple channels, how can you make the experience more profound?

  38. Designing with XML and XLink • What associations might the active element have? • How do you show multiple associations? • What possible resources can you group together? • What if people are part of the matrix of resources? • What do combinations of the same resources produce? • Does the active element become changed through transmission?

  39. Finding out more about XML • Short tutorials on XML, XSL, DTD… • http://www.w3schools.com/ • Web pages using XML • http://www.xmltree.com/ • Scalable Vector Graphics • http://www.adobe.com/svg/viewer/install/main.html • Preside Web Framework: XML and SVG Standards • http://lbeaudoi-1/WebFramework/WFW_05.htm • XML and the Second-Generation Web • http://www.sciam.com/1999/0599issue/0599bosak.html • XML W3C Definition • http://www.w3.org/XML/ • XML based routing hardware • http://www-us-east.intel.com/netstructure/products/xml_7210.htm

More Related