Geir, I know this doesn't help the fact that you need document order, but on XML-DEV is discussion that XPath doesn't specify that you have to have document order.
Dunno. -bob ---------- Forwarded message ---------- To: 'Amy Lewis' <[EMAIL PROTECTED]>, 'Evan Lenz' <[EMAIL PROTECTED]> From: Michael Kay <[EMAIL PROTECTED]> Date: Thu, 13 Dec 2001 19:18:03 -0000 Subject: RE: [xml-dev] Nasty XPath expressions Cc: 'bob mcwhirter' <[EMAIL PROTECTED]>, 'Kelvin Yeow' <[EMAIL PROTECTED]>, [EMAIL PROTECTED] > 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 ----------------------------------------------------------------- The xml-dev list is sponsored by XML.org <http://www.xml.org>, an initiative of OASIS <http://www.oasis-open.org> The list archives are at http://lists.xml.org/archives/xml-dev/ To subscribe or unsubscribe from this list use the subscription manager: <http://lists.xml.org/ob/adm.pl> _______________________________________________ Jaxen-interest mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jaxen-interest