[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: processing numbers in scientific notatioin
> 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). Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|