There has been a recent bug report (http://bugzilla.gnome.org/show_bug.cgi?id=337565) concerning the formatting of numbers by libxslt (actually by libxml2's xpath.c). After reading through the XPath spec, it appears to me that this report is probably correct. However, before I implement a "fix", I would like to give list members a chance to voice any potential disagreement.
The essence of the problem is this: According to the spec, when a number is converted to a string (Section 4.2 String Functions), "if the number is an integer, the number is represented in decimal form as a Number with no decimal point and no leading zeros, preceded by a minus sign (-) if the number is negative" However, there doesn't seem to be any good definition of what an "integer" is. In particular, should a number which is greater than MAX_INT on some system still be treated as an "integer"? The existing code within our library doesn't do this - instead, it treats it as a "non-integer" and outputs the value in exponential form. I believe this is incorrect, but would welcome any opposing views. Bill _______________________________________________ xslt mailing list, project page http://xmlsoft.org/XSLT/ [email protected] http://mail.gnome.org/mailman/listinfo/xslt
