#1 xsl:number can't handle large integers

v6.3
closed
Michael Kay
5
2012-10-08
2001-07-04
Michael Kay
No

I think that xsl:number should be able to handle any
XPath number,
shouldn't it? When I try:

<xsl:number value="9999999999" format="1" />

in Saxon 6.3 then I get:

2147483647

(Jeni Tennison)

Discussion

  • Michael Kay
    Michael Kay
    2001-07-04

    Logged In: YES
    user_id=251681

    Applies to all releases up to and including 6.4.1

     
  • Michael Kay
    Michael Kay
    2001-07-04

    Logged In: YES
    user_id=251681

    Partial fix in 6.4.2: numbers greater than
    Integer.MAX_VALUE are handled the same as negative numbers,
    they are rounded using round() (which may lose precision)
    and then output using the string() function, without
    reference to the format attribute.