Download presentation
Presentation is loading. Please wait.
Published byLee McKenzie Modified over 9 years ago
1
Namespace information are represented as namespace node which maps in scope on an element Attach to every element node where namespace is declared root commentelement namespacetextelement namespacetextelement
2
//title[@lang="de"] /descendant-or-self::book[last()] //node() or //* //book[price>30] Everyday Italian Giada De Laurentiis 2005 30.00 Harry Potter J K. Rowling 2005 29.99 XQuery Kick Start James McGovern Per Bothner Kurt Cagle James Linn Vaidyanathan Nagarajan 2003 49.99 Learning XML Erik T. Ray 2003 39.95
3
//author[../title[contains(string(.),"XML")]] //title[contains(string(.),"XML")]/parent::node()/child::author
4
for $x in //book return if(contains(string($x/title),"XML")) then (replace($x/title, "XML", "Extensible Markup Language")) else upper-case($x/title) for $x in //book return if( $x/price >= 35.00) then (replace( string($x/price), string($x/price), 40 cast as xs:string)) else $x/price XPath variable are “read-only” and cannot be modified for $x in //book let $y:=$x/price return if( $y >= 35.00) then ($y=40.00) else $x/price
5
This class handles input ExpressionResult count( //* )7 count( //@* )6 count( //argument )2 count( //class )1 count( //function )2 count( //description )1 count( //return )1 count( //text() )1 count( //function/return )1 count( //function/argument ) 2 count( //class/* )3 count( //description/* )0 //class/description{"This class handles input"} //@name{"input", "text", "number"} //@type{"string", "int", "string"} //return/@type{"int"} //argument/@type{"string", "string"} boolean( //function/@name ) true boolean( //class/@name )true
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.