Problem as described by the customer.
This is a generic problem affecting xalan 2.4.1 as supplied with jdk 1.4.2.
In the apache source file XStringForFSB.java the method toDouble() at the
end of the file contains an algorithmic error. Specifically, if the input
String value conyains more than about 18 digits then the intermediate long
values used internally by the algorithm will overflow and the final double
value that is calculated will be wrong.
I attach a couple of small files (an xml file and an xsl file)that
illustrate this problem.
Run as follows : java org.apache.xalan.xslt.Process -Q -IN elements.xml -XSL
And observe that the output value for the "atomic weight" of helium is
We observed this while comparing the output data from a real production
system that has been running successfully on Solaris using JDK 1.4 with the
output from a Linux system running JDK 1.4.2. The Solaris/1.4 system worked
perfectly, but the Linux/1.4.2 system had incorrect values in the output
file. Note that this is not a linux problem, it's a bug in the xalan
implementation and it's generic.
Apache fixed this quite some time ago but the fix is not in the 2.4.1 code