[Bug 6861] New: [XPath] general comparison operator '='

http://www.w3.org/Bugs/Public/show_bug.cgi?id=6861

           Summary: [XPath] general comparison operator '='
           Product: XPath / XQuery / XSLT
           Version: Recommendation
          Platform: PC
               URL: http://www.w3.org/TR/2009/PER-xpath20-20090421/
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XPath
        AssignedTo: jonathan.robie@redhat.com
        ReportedBy: gandhi.mukul@gmail.com
         QAContact: public-qt-comments@w3.org


This comment is about one of the language features defined in "W3C XPath 2.0,
PER document". Though, this language feature is present since all previous
XPath 2.0 documents.

The details of my query is described below:

In the following section, on "general comparisons"
http://www.w3.org/TR/2009/PER-xpath20-20090421/#id-general-comparisons

One of the conditions for evaluation of operator '=' is define as following:
The result of the comparison is true if and only if there is a pair of atomic
values, one in the first operand sequence and the other in the second operand
sequence, that have the required magnitude relationship. Otherwise the result
of the comparison is false.

The examples given in spec says, that following two expressions are true:
(1, 2) = (2, 3)
(2, 3) = (3, 4)

while following is false:
(1, 2) = (3, 4)

I think, common programming practice is that comparion operator '=' when
applied to two collections, would return true if *all items* in both
collections are equal by magnitude.

Why does the XPath 2.0 spec defines the semantics of operator '=' in such a way
that, magnitude equality of only 1 item is enough, for '=' operator to return
'true'?

Regards,
Mukul


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Saturday, 2 May 2009 02:56:45 UTC