XML, XSLT, XPath, XQuery 5 Aug 2002
Introduction XML (eXtensible Markup Language) –Holding data XSLT (eXtensible Style Language Transform) –Transform one XML to another XML or other text such as HTML XPath (XML Path) –A way to locate items in a XML file XQuery (XML Query) –Query on one or more XML file to produce another XML file
Analogy XML viewDatabase view XMLData XSLTHTML with ASP,JSP XPathReferring to a field, such as Student.id XQuerySQL RDMS enforced constraintSelf-describing storageExchange and sharing structuredSemi-structured Properties
Sample XML (link)link Mozart Austrian Beethoven German Bach German Mahler Austrian Specify XSL for display
DOM Tree Text Node Element Node Root Node Attribute Node authors author period Classical namenationality period Classical namenationality period Baroque namenationality MozartAustrian GermanBeethovenGermanBach
Sample XSL (link)link Authors Composers from Austria Name XSL version XPath
Output (link)link Original XML Transformed XML
Sample XSL Authors Composers from classical period Name
Output Original XML Transformed XML
P2P Example (link)link
XQuery (link) (xquery)linkxquery { FOR $i IN document(“index.xml")/peer/image WHERE $i/signature > “10” AND $i/signature < “16” RETURN $i } > sample –f index.xml –a index.xml –q query.xqu 15 13
Illustration XML XQueryXML XQuery engine DTD/ schema Validating parser XSL XML/ text/ HTML Browser XPath Assist
Possible Application XML index file P2P Web/ Gnutella gateway XQuery XML Web Other P2P client XQuery Other presentation method