|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Xslt 2 stripping out non-numbers
Greetings, I need to strip out non-numerical values from a string. Here is a sample input value: TUV0062 And what I want is : 0062 (or just 62) Here's what I've tried so far: for $i in tokenize(state_license_number, '\.') return xs:string( if (string(number(.)) = 'NaN') then '' else $i) But this does not work. I get an empty string as a result If I do this: for $i in tokenize(state_license_number, '\.') return xs:string($i) I get the whole string back so I know my "for" statement is returning something. What is the correct way to do this using XSLT 2? Thanks, Jim
|
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








