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

[Bug 1487] New: Undocumented incompatibility: sort key = ()

From: <bugzilla@wiggum.w3.org>
Date: Sun, 29 May 2005 21:15:58 +0000
To: public-qt-comments@w3.org
Message-Id: <E1DcV8Y-0007vM-2C@wiggum.w3.org>


           Summary: Undocumented incompatibility: sort key = ()
           Product: XPath / XQuery / XSLT
           Version: Last Call drafts
          Platform: PC
        OS/Version: Windows XP
            Status: NEW
          Severity: normal
          Priority: P2
         Component: XSLT 2.0
        AssignedTo: mike@saxonica.com
        ReportedBy: mike@saxonica.com
         QAContact: public-qt-comments@w3.org

There is an undocumented backwards incompatibility in the handling of sort keys.
In the absence of a data-type attribute

<xsl:sort select="@a"/>
<xsl:sort select="@b"/>

will sort <x b="2"/> after <x a="" b="1"/> in XSLT 1.0, but before it in XSLT
2.0. Specifically, XSLT 1.0 considers an empty sequence to be equal to a
zero-length string in this situation, while XSLT 2.0 considers an empty sequence
to collate before a zero-length string.

Michael Kay
Received on Sunday, 29 May 2005 21:15:59 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:05 UTC