[Home] [By Thread] [By Date] [Recent Entries]

  • To: xml-dev@l...
  • Subject: Question regarding XSLT number function
  • From: Bill Riegel <BRiegel@l...>
  • Date: Wed, 25 Feb 2004 08:09:49 -0600

I tried to use the follow line to determine if an input was a number or not.


<xsl:if test="number( input ) = number( input )" >

I read somewhere that if input is not a number,  the function returns NaN,
and NaN is not equal to NaN so this should work. 

If my input is "75 F", Xalan 2.5.2 says it is a number, 75, but
I have tried it against xmlspy and another IDE called Stylus Studio, and
they but indicate it is not a number. 

Is there a problem with Xalan number implementation ? 

Bill Riegel
LandMark Graphics
713-839-3388



Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member