xsl-list
[Top] [All Lists]

Re: [xsl] Floating point numbers in msxml xslt processor

2006-06-14 07:37:17


is it true that msxml processor does not treat the floating point
numbers (with scientific notation) like 1.234e-3  as numeric values.

yes the same is true of all XSLT1 processors.  1.234e-3  is a syntax
error in XPath1 (it is floating point syntax in XPath2)

my client application uses the msxml (Internet explorer 6).
is there any workaround to make it work.

in pure xslt use substring-after to split on the e and then multiply or
divide by 10 the specified number of times. If you know you are on
msxml, probably simpler just to write an extension function using msxsl:script
in javascript or some such language to just return the number.

David

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>