[Bug 21599] New: format-number() integer-part grouping overly prescriptive

https://www.w3.org/Bugs/Public/show_bug.cgi?id=21599

            Bug ID: 21599
           Summary: format-number() integer-part grouping overly
                    prescriptive
    Classification: Unclassified
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.0
          Assignee: mike@saxonica.com
          Reporter: paul@lucasmail.org
        QA Contact: public-qt-comments@w3.org

XQuery Functions and Operators 3.0 [F&O], section 4.7.4, says in part:

> The integer-part-grouping-positions is a sequence of integers representing the positions of grouping separators within the integer part of the sub-picture. For each grouping-separator-sign that appears within the integer part of the sub-picture, this sequence contains an integer that is equal to the total number of optional-digit-sign and decimal-digit-family characters that appear within the integer part of the sub-picture and to the right of the grouping-separator-sign.

Compare with section 4.6.1 for format-integer():

> The position of grouping separators within the format token, counting backwards from the last digit, indicates the position of grouping separators to appear within the formatted number, and the character used as the grouping-separator-sign within the format token indicates the character to be used as the corresponding grouping separator in the formatted number.

4.7.4 seems overly prescriptive, in particular for an implementation to keep
track of a sequence of integers whose value is "the total number of
optional-digit-sign and decimal-digit-family characters that appear within the
integer part of the sub-picture and to the right of the
grouping-separator-sign."

Such a sequence also seems unnecessary since I have an implementation of
format-integer() that determines no such sequence yet still manages to format
integers correctly.

One would think and expect the specification for format-integer() and the
integer part of format-number() to be equal.  If, however, the specification
for format-number() really needs to be different (and really needs to determine
the aforementioned grouping sequence), it would be nice if the specification
said WHY it has to be different (and determine the sequence) in a Note.

-- 
You are receiving this mail because:
You are the QA Contact for the bug.

Received on Saturday, 6 April 2013 00:39:40 UTC