Subject:number() function Author:Daniel Lucio Date:08 Jan 2002 03:48 PM
hi all!
I found that the XPATH function number() does not returns NaN when it receives a non numeric value! It returns '0'!
This happens as well with the round() function.
Does anybody knows a workaround for this?? I need to test whether a value is numeric!
Regards!
Subject:Re: number() function Author:Daniel Lucio Date:08 Jan 2002 06:35 PM
Hi!
I was using Excelon 3.1, build 069e. I just downloaded the latest version (069f) and it keeps doing the same!
This is the behavior of excelon's built in processor:
function spec excelon
number(12.3) 12.3 12.3
number("12.3") 12.3 12.3
number("abc") NaN '0' <-WRONG
number(NaN) NaN NaN
Subject:Re: number() function Author:Daniel Lucio Date:08 Jan 2002 07:28 PM
Sorry, I tried to put some example XSLT script but your server erased those lines.
What I am trying to say, is that Excelon's internal processor does not returns 'NaN' from an instruction like number("abc") (behavior that I need to test if a value is numeric!). But Xalan-J does! So, the same XSLT script runs correctly using Xalan-J but not with Excelon's internal XSLT processor.