Subject: Re: [xsl] [XSL 3.0] Function that check if a xs:string can be converted as a xs:double From: "Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Wed, 31 May 2023 16:11:03 -0000 |
This is very nice to know -- thanks David and Mike Kay. Cheers, Wendell From: David Carlisle d.p.carlisle@xxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Sent: Wednesday, May 31, 2023 11:57 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: Re: [xsl] [XSL 3.0] Function that check if a xs:string can be converted as a xs:double On Wed, 31 May 2023 at 16:08, Piez, Wendell A. (Fed) wendell.piez@xxxxxxxx<mailto:wendell.piez@xxxxxxxx> <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx<mailto:xsl-list-service@xxxxxxxxxxxx rytech.com>> wrote: Hello, As an academic exercise it is still interesting to ponder what might be done without 'castable as'. I think it was Ken H who once suggested (context of XSLT 1.0) select="number($str) = number($str)" as NaN is not equal to itself. I can't say where he got it. (In XPath 1.0 one was forced to be creative.) Or whether it would work for you in the given context or indeed corresponds to 'castable as'. "NaN" is true for castable as, but false for number = number Regards, Wendell XSL-List info and archive<http://www.mulberrytech.com/xsl/xsl-list> EasyUnsubscribe<http://lists.mulberrytech.com/unsub/xsl-list/3302254> (by email<>)
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] [XSL 3.0] Function that c, David Carlisle d.p.c | Thread | Re: [xsl] [XSL 3.0] Function that c, Michael Kay mike@xxx |
Re: [xsl] [XSL 3.0] Function that c, Michael Kay mike@xxx | Date | Re: [xsl] preserving the base URI o, G. Ken Holman g.ken. |
Month |