W3C home > Mailing lists > Public > www-ql@w3.org > April to June 2004

RE: Question regarding order in XPath

From: Michael Kay <mhk@mhk.me.uk>
Date: Fri, 21 May 2004 20:47:32 +0100
To: "'Murali Mani'" <mani@CS.UCLA.EDU>, <www-ql@w3.org>
Message-Id: <20040521194807.A5FA8A2C85@frink.w3.org>

> I see that in XPath you mention that forward axes return a sequence of
> nodes in document order, and reverse axes return a sequence 
> of nodes in reverse document order.

Are we talking XPath 1.0 or 2.0?

Either way, the statement isn't accurate. The result is always in document
order, regardless of the axis direction. But the binding of the current
position depends on the axis order.
> 
> My question is regarding attribute and namespace axes; they 
> are classified
> as forward axes; so what is the result order?

They are forward axes, though of course it doesn't matter very much, because
the order of nodes on these axes is implementation-defined.

Michael Kay
Received on Friday, 21 May 2004 15:48:07 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 22 July 2006 00:10:19 GMT