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 22:20:45 +0100
To: "'Murali Mani'" <mani@CS.UCLA.EDU>
Cc: <www-ql@w3.org>
Message-Id: <20040521212120.DC1AAA0E98@frink.w3.org>

> 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

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:43:43 UTC