xsl-list
[Top] [All Lists]

[xsl] [XSL] How to test "numericity" ?

2008-03-24 02:44:51
From: Martin Honnen <Martin(_dot_)Honnen(_at_)gmx(_dot_)de>
Subject: Re: [xsl] [XSL] How to test "numericity" ?
Message-ID: <47E6955C(_dot_)8090603(_at_)gmx(_dot_)de>

Alain wrote:


> Let's assume variable x contains the string to test.
> We cannot do simply xs:integer($s), or any casting like that, because it > would produce an fatal runtime error when not numeric.

xs:integer sounds as if you use XSLT 2.0 so there you can check
  $s castable as xs:integer

--

Martin Honnen

That's it!

You're right, I just skipped paragraph 3.10.3 of XPath 2.0.
Now I can see it, and it's so much clear like that.

Many thanks.

Alain BENEDETTI


--~------------------------------------------------------------------
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>