|
[XQuery Talk Mailing List Archive Home] [By Date] [By Thread] [By Subject] [By Author] [Recent Entries] [Reply To This Message] Position operatorMichael Rys mrys at microsoft.comMon Jan 23 01:12:03 PST 2006
[1] binds stronger than / or //.
So in the first case you get the first one under every descendant node.
In the second one you get the first.
Best regards
Michael
> -----Original Message-----
> From: http://xquery.com/mailman/listinfo/talk
> [mailto:http://xquery.com/mailman/listinfo/talk] On Behalf Of Ronald Bourret
> Sent: Monday, January 23, 2006 12:23 AM
> To: xquery-talk
> Subject: Position operator
>
> I'm missing something obvious here.
>
> Suppose book.xml contains multiple title elements. Why does:
>
> doc("book.xml")//title[1]
>
> return a sequence of all title elements and:
>
> (doc("book.xml")//title)[1]
>
> return the first title element? I would have thought both
> queries would
> return the first title element.
>
> Thanks,
>
> -- Ron
>
> _______________________________________________
> http://xquery.com/mailman/listinfo/talk
> http://xquery.com/mailman/listinfo/talk
>
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|






