[xsl] Floating point numbers in msxml xslt processor

Subject: [xsl] Floating point numbers in msxml xslt processor
From: "Jagdishwar B" <jagdishwar.beemanati@xxxxxxxxx>
Date: Wed, 14 Jun 2006 16:16:23 +0200
Hi all,
is it true that msxml processor does not treat the floating point
numbers (with scientific notation) like 1.234e-3  as numeric values.

Here is the e.g.:

xmlFile:

<root>
	<elemOne>1.234e-3</elemOne>
	<elemTwo>200</elemTwo>
</root>

I would like to multiply the above values and ouput in the transformed document.

xslFile:

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
	<xsl:template match="root">
		<result>
			<val>
				<xsl:value-of select="elemOne * elemTwo"/>
			</val>
		</result>
	</xsl:template>
</xsl:stylesheet>

I am expecting the following output:
<result>
	<val>0.2468</val>
</result>

when i tried this with the builtin xlst engine of xmlspy, it gives the
proper output as above.

But when i transformed  using msxml, i am getting "NaN" in the output:
<result>
	<val>NaN</val>
</result>


does it mean the value 1.234e-3 is not treated as the floating point value by msxml.

my client application uses the msxml (Internet explorer 6).
is there any workaround to make it work.

Thanks,
Jagdishwar B

Current Thread