Project

Profile

Help

format-number(0.0,'#')

Added by Anonymous almost 15 years ago

Legacy ID: #7790661 Legacy Poster:  (carstensis)

Hi, I tested the following expressions with Saxon 9.1.0.5: format-number(0.0,'#') returns the empty String format-number(0,'#') returns "0" This is of course a rather academic scenario (one should probably just use '0' as picture string instead of '#'), but shouldn't the first expression (with 0.0) also return "0"? According to the spec > The minimum-integer-part-size is an > integer indicating the minimum number > of digits that will appear to the left > of the decimal-separator-sign. It is > normally set to the number of > zero-digit-sign characters found in > the integer part of the sub-picture. > But if the sub-picture contains no > zero-digit-sign and no > decimal-separator-sign, it is set to > one. [http://www.w3.org/TR/xslt20/#dt-picture-string][1] I would guess that minimum-integer-part-size should be one in that case (since the picture does not contain a zero-digit-sign). Any comments on this? Cheers, Carsten [1]: http://www.w3.org/TR/xslt20/#dt-picture-string


Replies (1)

RE: format-number(0.0,'#') - Added by Anonymous almost 15 years ago

Legacy ID: #7790755 Legacy Poster: Michael Kay (mhkay)

Thanks for reporting this. You're quite right. I've logged the bug, committed a patch, and submitted a new test case to the W3C test suite.

    (1-1/1)

    Please register to reply