[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Nasty XPath expressions

xpath multiple axes
> Umm, no.
> Node-sets are ordered sets.  The spec spends (too much?) time
> discussing the ordering of returned sets, which depend upon the axis.
> So it isn't exactly true that they are always in document order
> (particularly if you're using a complex expression that moves in
> multiple axes), but it is true that the nodes are returned in
> the order
> of encounter, as specified by the axis.  Typically, this
> means document
> order.
> They are *not* unordered sets.

Wrong. XPath 1.0 node-sets are unordered.

If you read the material in section 2.4 again, you will see that it says an
axis has direction, and that the proximity position of a node in a node-set
depends on the direction of the associated axis. But it never says that
node-sets themselves are ordered, or that the nodes are "returned" in any
particular order. You might find the section easier to understand (I
certainly do) if you think of a node-set derived from a forwards axis as
being a list of nodes in document order, and a node-set derived from a
reverse axis as being a list of nodes in reverse document order, but the
spec very deliberately doesn't describe it that way.

Mike Kay


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.

Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.