[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] String to integer conversion


Subject: RE: [xsl] String to integer conversion
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Fri, 11 Mar 2005 18:26:55 -0000

> Can any one tell me how I can convert a string to integer and 
> a decimal
> to integer in XSLT.

XSLT 1.0 doesn't have decimal and integer types, it only has "number", which
is double-precision floating point. 

In XSLT 2.0 you can convert a string to an integer using
xs:integer($string), and a decimal to an integer using xs:integer($decimal).

Michael Kay
http://www.saxonica.com/


Current Thread
Keywords