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

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

           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