W3C home > Mailing lists > Public > public-qt-comments@w3.org > April 2013

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

From: <bugzilla@jessica.w3.org>
Date: Sat, 06 Apr 2013 00:39:38 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-21599-523@http.www.w3.org/Bugs/Public/>
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

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