xml xslt xpath xquery n.
Download
Skip this Video
Download Presentation
XML, XSLT, XPath, XQuery

Loading in 2 Seconds...

play fullscreen
1 / 13

XML, XSLT, XPath, XQuery - PowerPoint PPT Presentation


  • 141 Views
  • Uploaded on

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)

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'XML, XSLT, XPath, XQuery' - barbie


Download Now 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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
introduction
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

Properties

Semi-structured

structured

Exchange and sharing

storage

Self-describing

RDMS enforced constraint

Analogy
sample xml link

SpecifyXSL for display

Sample XML (link)

<?xml:stylesheet type="text/xsl" href="classical.xsl"?>

<authors>

<author period="Classical">

<name>Mozart</name>

<nationality>Austrian</nationality>

</author>

<author period="Classical">

<name>Beethoven</name>

<nationality>German</nationality>

</author>

<author period="Baroque">

<name>Bach</name>

<nationality>German</nationality>

</author>

<author period="Romance">

<name>Mahler</name>

<nationality>Austrian</nationality>

</author>

</authors>

dom tree
DOM Tree

Root Node

Element Node

Text Node

authors

Attribute Node

author

author

author

period

Classical

name

nationality

period

Classical

name

nationality

period

Baroque

name

nationality

Mozart

Austrian

Beethoven

German

Bach

German

sample xsl link

XSL version

XPath

Sample XSL (link)

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="/">

<HTML>

<HEAD><TITLE>Authors</TITLE></HEAD>

<BODY>

<H1>Composers from Austria</H1>

<TABLE BORDER="1"><TR><TH>Name</TH></TR>

<xsl:for-each select="/authors/author[nationality='Austrian']">

<TR><TD><xsl:value-ofselect="name" /></TD></TR>

</xsl:for-each>

</TABLE>

</BODY>

</HTML>

</xsl:template>

</xsl:stylesheet>

output link
Output (link)

Original XML

Transformed XML

sample xsl
Sample XSL

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">

<xsl:template match="/">

<HTML>

<HEAD><TITLE>Authors</TITLE></HEAD>

<BODY>

<H1>Composers from classical period</H1>

<TABLE BORDER="1">

<TR><TH>Name</TH></TR>

<xsl:for-each select="/authors/author[@period='Classical']">

<TR><TD><xsl:value-ofselect="name" /></TD></TR>

</xsl:for-each>

</TABLE>

</BODY>

</HTML>

</xsl:template>

</xsl:stylesheet>

output
Output

Original XML

Transformed XML

p2p example link
P2P Example (link)

<peer ip=“137.189.89.7”>

<image name=“a.jpg”>

<signature>15</signature>

</image>

<image name=“b.jpg”>

<signature>20</signature>

</image>

<image name=“c.jpg”>

<signature>13</signature>

</image>

<image name=“d.jpg”>

<signature>5</signature>

</image>

</node>

xquery link xquery
XQuery (link) (xquery)

<result>

{

FOR $i IN document(“index.xml")/peer/image

WHERE $i/signature > “10” AND $i/signature < “16”

RETURN $i

}

</result>

> sample –f index.xml –a index.xml –q query.xqu

<result>

<image filename="a.jpg">

<signature>15</signature>

</image>

<image filename="c.jpg">

<signature>13</signature>

</image>

</result>

illustration

XQuery

XML

Validatingparser

XQuery engine

DTD/schema

Browser

XSL

XML/text/HTML

Assist

XPath

Illustration

XML

possible application

Web/Gnutellagateway

XML

Web

XQuery

Otherpresentationmethod

XQuery

Other P2Pclient

Possible Application

XMLindex file

XMLindex file

XMLindex file

XMLindex file

XMLindex file

P2P