RE: Question regarding order in XPath

> 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 UTC