|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: XPath number with 20 digits gives you a head ache
> > <xsl:value-of select="number(string('92125374252539897737'))" />
> >
[snip]
> > since most processors return
> >
> > 92125374252539900000
[snip]
>
> I hesitate to assert that the above is actually correct, but if you're
> getting it from several processors then the chances are that it is.
Results from XSLT processors I have on my machine:
Output XSLT Processor
======================================
92125374252539904000 SAXON 6.1
Xalan-C 1.0
UXT 1.03.00
XT
92125374252539900000 Xalan-J 2.0.D07
Xalan-J 1.2.2
MSXML 3.0
9.21253742525399E19 Oracle V2 (beta)
2147483647 iXSLT 2.0c
Interesting. Which, if any, is actually right?
> Incidentally calling the string() function on a string literal
> seems rather
> superfluous!
Just a desperate attempt to write a readable question :) BTW, would SAXON
optimize e.g.
<xsl:value-of select="number(string('42'))" />
to
<xsl:value-of select="42" />
during stylesheet preparation? And even though no one would ever write
something like
<xsl:if test="foo[boolean(contains(., 'get something better to read')) =
boolean(number(string(substring('24',1))))]">
would it be optimized somehow before executing the stylesheet to
<xsl:if test="foo[contains(., 'get something better to read')]">
or something in those lines? Just curious ;)
Jarno
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
|

Cart








