RE: Question regarding order in XPath

> 
> Is there a difference between XPath 1.0 and XPath 2.0? I 
> guess XPath 1.0
> never talked about returning a sequence, it mentions return a set of
> nodes, though "it was often assumed" by xml-dev folks that it 
> returns a
> sequence..??

XPath 1.0 returned a set of nodes in no particular order; but XSLT 1.0
always chose to process these nodes in document order. People calling XPath
from other environments, e.g. a Java API, have tended to assume the nodes
will be in document order, and in practice they probably are, but the XPath
1.0 spec doesn't guarantee it.

Michael Kay

Received on Friday, 21 May 2004 17:21:21 UTC