[xquery-talk] selection

David Carlisle davidc at nag.co.uk
Mon Feb 6 13:14:33 PST 2006


> I want $j to discard the book with 12 and stop at bookstore(the
A path selection never changes the nodes it is selecting.
You can go

doc("book.xml")//bookstore[book [price > 12]]

which selects all bookstore elements with a book > 12, howver
the children of $j will be as they were before, both books.

If you want to return a bookstore node with just books > 12, then you
will have to create a new element node, something like

doc("book.xml")//bookstore[book [price > 12]]/<bookstore>{book [price > 12]}</bookstore>

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________


More information about the talk mailing list