W3C home > Mailing lists > Public > public-qt-comments@w3.org > November 2005

[Bug 2535] One empty sequence is deep-equal to another, but they are not =

From: <bugzilla@wiggum.w3.org>
Date: Fri, 18 Nov 2005 19:18:38 +0000
To: public-qt-comments@w3.org
Message-Id: <E1EdBks-0001Fs-Rp@wiggum.w3.org>


           Summary: One empty sequence is deep-equal to another, but they
                    are not =
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XQuery
        AssignedTo: chamberl@almaden.ibm.com
        ReportedBy: steve.tolkin@fmr.com
         QAContact: public-qt-comments@w3.org
                CC: steve.tolkin@fmr.com

According to XQuery two empty sequences are NOT equal using the = comparison.
3.5.2 General Comparisons
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.

But http://www.w3.org/TR/xpath-functions/#func-deep-equal says
15.3.1 fn:deep-equal ...
If the two sequences are both empty, the function returns true.

Two objects that are deep-equal ought to be equal.

Suggestion: Fix the definition of = so that two empty sequences are equal to 
each other.  (Fix != also.)
Received on Friday, 18 November 2005 19:18:41 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:45:26 UTC