[Bug 2712] [XSLT 2.0] format-number(NaN)


           Summary: [XSLT 2.0] format-number(NaN)
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          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

Rule 1 at http://www.w3.org/TR/xslt20/#formatting-the-number specifies that NaN
is formatted using the prefix and suffix of the positive sub-picture. This
appears to be incompatible with XSLT 1.0, which ignores the prefix and suffix in
this case. The JSK 1.1.8 documentation (which 1.0 references) states:

* NaN is formatted as a single character, typically \\uFFFD.

* +/-Infinity is formatted as a single character, typically \\u221E, plus the
positive and negative pre/suffixes.

The "single character" is nonsense (though it's still there in the JDK 1.5
spec): DecimalFormatSymbols allows a String for these symbols! 

But the spec does say (in effect) that the prefix/suffix are NOT used for the
NaN case.

A post on the mulberry xsl-list today has pointed out this backwards
incompatibility with existing XSLT 1.0 implementations (citing Saxon and Xalan).

Received on Friday, 13 January 2006 17:50:25 UTC