Re: [xsl] [XSL 3.0] Function that check if a xs:string can be converted as a xs:double

Subject: Re: [xsl] [XSL 3.0] Function that check if a xs:string can be converted as a xs:double
From: "Michael Kay mike@xxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 31 May 2023 15:54:58 -0000
> Ah ! Yes ! castable as...
>
> I've also found xs:boolean(number(s)) is working correctly.
>
>

You didn't run enough tests.

xs:boolean applied to a number returns false if the number is 0 or NaN. So
you'll not only get false if the input is "banana", you'll also get false if
it is "0", "0.000", or "NaN'.

Michael Kay
Saxonica

Current Thread