This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
This test tests format-integer(-5, 'Ww;o') to be equal to "-Fifth", but in words, this is "Minus Fifth". I think this ought to be changed to accommodate for this variant: <any-of> <assert-eq>'-Fifth'</assert-eq> <assert-eq>'Minus Fifth'</assert-eq> </any-of>
This would require a spec change, and the spec change would create a backwards incompatibility.
Oh, my bad, I didn't find it in the spec under "w", "W" and "Ww", but now I see that there's a line saying: If the value of $value is negative, the rules below are applied to the absolute value of $value, and a minus sign is prepended to the result. It looks so odd. Anyway, it was not my intention to suggest a spec change, I thought the test was wrong. Apparently not.
I think code that wants to handle negative numbers with format-integer will often apply format-integer to the absolute value, and then "do its own thing" to indicate that it is negative. For example "The temperature is " || format-integer(abs($N)) || " degrees " || (if ($N gt 0) then "above zero" else if ($N lt 0) then "below zero" else "".
Yes, that makes sense. Thanks.