The number() function converts its argument to a value of type xs:double .
For example, the expression «number(' -17.3 ') » returns the xs:double value -1.73e1 .
Argument | Data Type | Meaning |
---|---|---|
value (optional) | item()? | The value to be converted. If the argument is omitted, the context item is used |
Result | xs:double | A double-precision floating point number: the result of converting the given value . If the argument cannot be converted to a number, the function returns NaN ( not-a-number ) |