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

processing numbers in scientific notatioin

Subject: processing numbers in scientific notatioin
From: "j_aseef i" <j_aseef@xxxxxxxxxxx>
Date: Tue, 15 Oct 2002 03:22:18 +0000
scientific notaion
Hi,
I am having some problems in getting return mails from the list, hence continuing on my question as a new thread. To give more back ground on the question, the problem occured when the same files were ported from weblogic6.1 to weblogic7 (hope this doesn look like a weblogic specific question). The two things which i am confused over are
1. When the number is given direclty it works fine but when the value in question is taken from an xml file, it is not recognized by xsl parser.
<xsl:value-of select="format-number((-3.9023177125017977E-4 * 100), '0.00', 'eurofrmt')"/> is working fine.

2. This thing works perfectly fine on weblogic6.1 but not in version 7 of the same (i beleive the same pareser could be used as nothing is mentioned in the releae notes for the version 7). Hence is there any syntactical enforements needed so that the fortran/scientific number formats are properly reconginzed. Is it ok to assume that version 7. uses a stricter parser which required some explicit directives for picking these formats properly.


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).



_________________________________________________________________
Join the world?s largest e-mail service with MSN Hotmail. http://www.hotmail.com



XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list



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.