Subject: [xsl] processing numbers in scientific notatioin From: "j_aseef i" <j_aseef@xxxxxxxxxxx> Date: Tue, 15 Oct 2002 03:22:18 +0000 |
<xsl:value-of select="format-number((-3.9023177125017977E-4 * 100), '0.00', 'eurofrmt')"/> is working fine.
Thanks a lot the previous answers, aseef.j
I need to process values passed in decimal format. The problem is when numbers are passed in scientific notaion the number() function is not recognizing it and outputs a NaN.
This following works fine
<xsl:value-of select="format-number((-3.9023177125017977E-4 * 100), '0.00', 'eurofrmt')"/>
It shouldn't work fine if the processor is XSLT 1.0 conformant: it should raise an XPath syntax error. XPath 1.0 does not allow numbers in scientific notation (or the Fortran notation that we programmers like to call "scientific notation").
I read somewhere that xpath2 compliant parsers alone process these kind of data.
Yes, XPath 2.0 handles this notation. But at the moment this restricts you to Saxon 7.x (or the new experimental version of Xalan).
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] processing numbers in sci, Michael Kay | Thread | RE: [xsl] [ANN] Announcing ActiveSt, DPawson |
RE: [xsl] XML document to WORD??, Lopez, William | Date | Re: [xsl] XML document to WORD??, Wendell Piez |
Month |