View Single Post
  #2 (permalink)  
Old October 31st, 2006, 01:24 PM
mhkay's Avatar
mhkay mhkay is offline
Wrox Author
Points: 18,487, Level: 59
Points: 18,487, Level: 59 Points: 18,487, Level: 59 Points: 18,487, Level: 59
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2004
Location: Reading, Berks, United Kingdom.
Posts: 4,962
Thanks: 0
Thanked 292 Times in 287 Posts
Default

In XSLT 1.0 the conversion will be done automatically, or you can call the number() function.

In XSLT 2.0 you can call the number function. This will give you a double. If you want an integer, you can call the xs:integer() function.

Personally, in 2.0 I would do the string manipulation using a regular expression. I think your expression can be replaced by tokenize(securityKey, ':')[3].

Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference
Reply With Quote