[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
Re: [xsl] XSLT number() problem
Subject: Re: [xsl] XSLT number() problem From: "Thomas B. Passin" <tpassin@xxxxxxxxxxxx> Date: Wed, 19 Jun 2002 10:20:22 -0400 |
[Alex Genis] > Maybe somebody knows why > <xsl:if test="string(number(@FieldA)) = 'NaN'"> > returns true in both cases: > when FieldA = 987876765654ABCDEF and > when FieldA = 111122223333444456 ? > Is it any other way to figure out : "Is FiledA numeric or not?" Your example worked fine for me. You can also simplify the test like this: <xsl:if test='number(@FieldA)'> Perhaps you are not actually selecting @FieldA because the context is not what you expect of you have a type somewhere. Try displaying the value and see if it is what you expect: <xsl:value-of select='@FieldA'/> Cheers, Tom P XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] XSLT number() problem, Alex Genis | Thread | Re: [xsl] XSLT number() problem, Jeni Tennison |
[xsl] <xsl:for-each select="$myvar", William S. | Date | Re: [xsl] <xsl:for-each select="$my, Vasu Chakkera |
Month |