W3C home > Mailing lists > Public > public-qt-comments@w3.org > September 2015

[Bug 29164] New: [FO31] format-number() with first argument 0

From: <bugzilla@jessica.w3.org>
Date: Wed, 30 Sep 2015 17:41:55 +0000
To: public-qt-comments@w3.org
Message-ID: <bug-29164-523@http.www.w3.org/Bugs/Public/>

            Bug ID: 29164
           Summary: [FO31] format-number() with first argument 0
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators 3.1
          Assignee: mike@saxonica.com
          Reporter: debbie@saxonica.com
        QA Contact: public-qt-comments@w3.org
  Target Milestone: ---

Consider format-number(0, '.#'), and format-number(0,'#.#'). 

Currently the formatting rules give the result (in both cases) as an empty
string, which is surely wrong. Here's the current working:

In both cases, the first argument of format-number() is the value zero; and by
the rules of 4.7.4, the minimum-integer-part-size and
minimum-fractional-part-size are both zero, while the
maximum-fractional-part-size is non-zero. No adjustments are made.

In 4.7.5 (Formatting the number), we get to rule 7 which says "The value zero
will at this stage be represented by an decimal-separator on its own." In the
following rules, no padding zeroes are added (since minimum-integer-part-size
and minimum-fractional-part-size are both zero), and then by rule 12 the
decimal separator itself is removed to leave the empty string.

You are receiving this mail because:
You are the QA Contact for the bug.
Received on Wednesday, 30 September 2015 17:41:58 UTC

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