[Bug 28845] fn:format-number, formatting rules for exponential notation

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

--- Comment #9 from Debbie Lockett <debbie@saxonica.com> ---
Subtle amendment to the proposed adjustment to the rules for
minimum-integer-part-size:

if minimum-integer-part-size and maximum-fractional-part-size are both zero,
then:
        • if there is an exponent separator, set *minimum-fractional-part-size*
(and maximum-fractional-part-size) to 1;
        • otherwise set minimum-integer-part-size to 1.

Corresponding amendment to 4.7.4 new rule:
if the effect of the above rules is that minimum-integer-part-size and
maximum-fractional-part-size are both zero, then an adjustment is applied as
follows: if an exponent separator is present then minimum-fractional-part-size
is changed to 1 (one) (and so is maximum-fractional-part-size); otherwise
minimum-integer-part-size is changed to 1 (one).

Then in the first example:
fn:format-number(0.2, '#.e9') => ".2e1"

(Explanation: min-int-part-size=0, scaling-factor=0. Initially
max-frac-part-size=0, but it and min-frac-part-size get adjusted to 1 by the
new rule. A '#' in the integer part of the picture has no effect except on
grouping separators. But see the CODA, which would change the result to 0.2e1)

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

Received on Thursday, 10 September 2015 09:33:07 UTC