DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9179>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9179

xsltc not putting leading and trailing zeroes (math110)





------- Additional Comments From [EMAIL PROTECTED]  2002-05-16 20:47 -------
Note that both Xalan-J's and Saxon's output is also incorrect.  I have stressed 
this multiple times to the Xalan-J team, and the maintainers of the conformance 
suite.  The value "0.00040" is wrong -- it should be "0.0004".  You can verify 
this by reading the language of the recommendation:

http://www.w3.org/TR/xpath#section-String-Functions

Here's relevant excerpt:

"otherwise, the number is represented in decimal form as a Number including a 
decimal point with at least one digit before the decimal point and at least one 
digit after the decimal point, preceded by a minus sign (-) if the number is 
negative; there must be no leading zeros before the decimal point apart 
possibly from the one required digit immediately before the decimal point; 
beyond the one required digit after the decimal point there must be as many, 
but only as many, more digits as are needed to uniquely distinguish the number 
from all other IEEE 754 numeric values."

Since a trailing "0" can never distinguish one number from another, _any_ 
trailing 0 is incorrect.

This bug is present in both Saxon and Xalan-J because they both use James 
Clark's original XT string formatting code.

If you're going to fix it, you should do it right, and not follow the 
conformance test, which is broken.

Reply via email to