W3C home > Mailing lists > Public > public-qt-comments@w3.org > February 2004

RE: ORA-XQ-282-B: sort order of results of a step expression

From: Michael Kay <mhk@mhk.me.uk>
Date: Mon, 16 Feb 2004 23:06:23 -0000
To: "'Stephen Buxton'" <Stephen.Buxton@oracle.com>, <public-qt-comments@w3.org>
Message-ID: <000e01c3f4e1$812bb4d0$6401a8c0@pcukmka>

> SECTION 3.2: Path expressions
> It says in the third paragraph after rule [70] that
> "Each operation E1/E2 is evaluated as follows:
> expression E1 is evaluated... The sequence of nodes resulting 
> from all evaluations of E2 are combined, eliminating duplicate nodes 
> based on node identity and sorting the result in document 
> order". Later, in section 3.2.1 "Steps", in the last 
> paragraph prior to the final note, it says "If the axis is a 
> reverse axis, context positions are assigned in reverse 
> document order."  These two sentences 
> appear to be in contradiction.  Either reverse axes result in 
> a sequence that is in forward document order, or the general 
> statement in 3.2 should say that the result is in either 
> forward or reverse document order.

This situation (which is unchanged from XPath 1.0) has always been
confusing, but I think we describe it more clearly now than we did in
XPath 1.0, and the statements are not contradictory. The expression
ancestor::X[P] delivers nodes in document order, but within P, the
positions of the nodes are counted in reverse document order.

Michael Kay
Received on Monday, 16 February 2004 18:05:44 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:56:54 UTC