xsl-list
[Top] [All Lists]

Re: testing for string and number in XSLT 2.0 was Re: [xsl] Test For Numeric Values?

2005-04-08 05:04:10
On Apr 8, 2005 9:59 PM, Michael Kay <mike(_at_)saxonica(_dot_)com> wrote:

It might have been a string that is the string
representation of a number:

  "3.1415" (is a string)

but this is completely different from:

    3.1415 (is a number).

What will really be useful is a function with an argument of item(),
that returns the real type of the argument.


Or go back to my original suggestion, which was to use

if ($x castable as xs:decimal) ...

Unfortunately, this evaluates to true() on both "3.1415" and 3.1415


Cheers,

Dimitre Novatchev.

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



<Prev in Thread] Current Thread [Next in Thread>