Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries [Thread Prev] >Thread Next - Re: Problem with format-number producing NaN Problem with format-number producing NaNTo: NULL Date: 6/13/2007 3:10:00 PM
Hello!
I have a problem where format-number is returning NaN. The number I'm
trying to format is 1.067697055212997e-006. Here's the stylesheet:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="text" encoding="ISO-8859-1" />
<xsl:template match="sub">
<xsl:value-of select="format-number(@slope, '0.000000')" />
</xsl:template>
</xsl:stylesheet>
And the data:
<?xml version="1.0" encoding="utf-8"?>
<top>
<sub slope="1.067697055212997e-006" />
</top>
Why is this producing NaN? I would expect 0.000001 as I want to force six
decimals. What can I do to get around this problem?
Thanks in advance!
--
Daniel
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
