[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Floating point numbers in msxml xslt processor

Subject: Floating point numbers in msxml xslt processor
From: "Jagdishwar B" <jagdishwar.beemanati@xxxxxxxxx>
Date: Wed, 14 Jun 2006 16:16:23 +0200
msxml xslt processor output
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.