XSLT 1.0 offers only double-precision floating point. That doesn't carry
enough digits of precision for this problem.
XSLT 2.0 offers decimal and integer arithmetic. The limits on precision
(above 18 digits) are implementation defined, but Saxon offers unlimited
precision. So it should get this one right, provided that you are careful to
ensure the value is treated as an integer rather than a double.
Michael Kay
http://www.saxonica.com/
-----Original Message-----
From: Pankaj Bishnoi [mailto:pankaj(_dot_)bishnoi(_at_)adeptia(_dot_)com]
Sent: 24 January 2006 13:55
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] Problem using Math functions
Hi
I am facing problem in math function '+'. My Source XML is :::
<employees>
<employee>
<Arg1>1000020000300004000050000</Arg1>
<Arg2>0000000000000001000010000</Arg2>
</employee>
</employees>
and XSL is ::::
<xsl:template match="/">
<employees>
<employee>
<Output>
<xsl:value-of select="/employees/employee/Arg1+
/employees/employee/Arg2"/>
</Output>
</employee>
</employees>
</xsl:template>
Now the Output generated is ::::
<employees>
<employee>
<Output>1000020000300005000000000</Output>
</employee>
</employees>
Now here the output generated is 1000020000300005000000000 it
should have
been 1000020000300005000060000. I am using Xalan transformer for my
transformations. Here the transformer is appending five 0's
in the last 5
positions. whenever the ouput exceeds 20 characters then it
inserts 0's.
Anybody having any idea on this problem??
Please advise. Thanks in advance.
Thanks
Pankaj
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail:
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--
--~------------------------------------------------------------------
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--