Re: inconsistent definition of order comparisons

Apologies, wrong section of spec attached (to early in the morning). 
Correct now

Hi,

I believe the xpath2 spec to be incorrect in its definition.



http://www.w3.org/TR/xpath20/#id-order-comparisons

2.6.4 Order Comparisons

3. A comparison with the << operator returns true if the first operand 
node is earlier than the second operand node in document order, or false 
if the first operand node is later than the second operand node in 
document order.
4. A comparison with the >> operator returns true if the first operand 
node is later than the second operand node in document order, or false if 
the first operand node is earlier than the second operand node in document 
order.



http://www.w3.org/TR/xquery-operators/#func-node-before


11.1.7 op:node-before
op:node-before(node $parameter1, node $parameter2) => boolean

If the node identified by the value of $parameter1 occurs in document 
order before the node identified by the value of $parameter2, this 
function returns true; otherwise, it returns false. The rules determining 
the order of nodes within a single document and in different documents can 
be found in [XQuery 1.0 and XPath 2.0 Data Model]. This function backs up 
the "<<" operator.

11.1.8 op:node-after
op:node-after(node $parameter1, node $parameter2) => boolean

If the node identified by the value of $parameter1 occurs in document 
after the node identified by the value of $parameter2, this function 
returns true; otherwise, it returns false. The rules determining the order 
of nodes within a single document and in different documents can be found 
in [XQuery 1.0 and XPath 2.0 Data Model]. This function backs up the ">>" 
operator.



Gareth

Received on Tuesday, 6 August 2002 20:47:44 UTC