W3C home > Mailing lists > Public > public-qt-comments@w3.org > August 2002

RE: inconsistent definition of order comparisons

From: Kay, Michael <Michael.Kay@softwareag.com>
Date: Wed, 7 Aug 2002 12:22:36 +0200
Message-ID: <DFF2AC9E3583D511A21F0008C7E621060453DA80@daemsg02.software-ag.de>
To: Gareth Reakes <gareth@decisionsoft.com>, public-qt-comments@w3.org

In the April draft we included two pairs of operators:

   << , >>
   precedes , follows

with subtly different semantics, and we included an issue (#229) suggesting
that we didn't really need both pairs of operators.

We have since made a decision on this issue, and the next draft will include
only the first pair of operators.

Thanks for your comments.

Michael Kay
Software AG



> 
> 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/#op-node-precedes

11.1.9 op:node-precedes
op:node-precedes(node $srcval1, node $srcval2) => boolean

Returns true if the node identified by $srcval1 occurs before the node 
identified by $srcval2 in document order, but is not an ancestor of the 
node identified by $srcval2. Otherwise returns false. This function backs 
up the "precedes" operator on nodes.
11.1.10 op:node-follows
op:node-follows(node $srvcal1, node $srcval2) => boolean

Returns true if the node identified by $srcval1 occurs after the node 
identified by $srcval2 in document order, but is not a descendant of the 
node identified by $srcval2. Otherwise returns false. This function backs 
up the "follows" operator on nodes.



-- 
Gareth Reakes, Head of Product Development  
DecisionSoft Ltd.            http://www.decisionsoft.com
Office: +44 (0) 1865 203192
Received on Wednesday, 7 August 2002 06:22:43 UTC

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