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

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

--- Comment #1 from Michael Kay <mike@saxonica.com> ---
For what it's worth, I think this bug has been present since the XSLT 2.0
specification of the function.

I think the fix is to add a rule (as the 10th bullet of 4.7.4:

* If (after making the above adjustments) the minimum integer part size and the
minimum fractional part size are both zero, then the minimum fractional part
size is set to 1 (one).

After discussing the wording of the rules with Debbie, I think it would also be
clearer if we changed rule 7 of 4.7.5 from

<quote>
The absolute value of the rounded number is converted to a string in decimal
notation, with no insignificant leading or trailing zeroes, using the digits in
the ·decimal digit family· to represent the ten decimal digits, and the
decimal-separatorXP31 character to separate the integer part and the fractional
part. (The value zero will at this stage be represented by an
decimal-separatorXP31 on its own.)
</quote>

to

<quote>
The absolute value of the rounded number is converted to a string in decimal
notation using the digits in the ·decimal digit family· to represent the ten
decimal digits, and the decimal-separator character to separate the integer
part and the fractional part. This string must always contain a decimal
separator, and it must contain no leading zeroes and no trailing zeroes. The
value zero will at this stage be represented by a decimal-separator on its own.
</quote>

Debbie also points out that the Note in the 8th bullet of 4.7.4, specifically

<quote>
This has the effect that with the picture .#e9, the value 0.123 is formatted as
.1e0
</quote>

fails to illustrate the effect intended, because the maximum fractional part
size is not zero. Replace it by:

<quote>
This has the effect that with the picture #.e9, the value 0.123 is formatted as
0.1e0
</quote>

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

Received on Thursday, 1 October 2015 09:09:40 UTC