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
/descendant-or-self::book[last()] //node() or //* //book[price>30] Everyday Italian Giada De Laurentiis Harry Potter J K. Rowling XQuery Kick Start James McGovern Per Bothner Kurt Cagle James Linn Vaidyanathan Nagarajan Learning XML Erik T. Ray
//author[../title[contains(string(.),"XML")]] //title[contains(string(.),"XML")]/parent::node()/child::author
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
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"} "text", "number"} "int", "string"} "string"} boolean( ) true boolean( )true