Subject: Re: [xsl] XSLT number() problem From: Jeni Tennison <jeni@xxxxxxxxxxxxxxxx> Date: Wed, 19 Jun 2002 23:43:51 +0100 |
Tom Passin wrote: > Your example worked fine for me. You can also simplify the test like > this: > > <xsl:if test='number(@FieldA)'> Note that this test also returns false if the FieldA attribute is 0, which may or may not be desired. To test whether the numeric value of the FieldA attribute is NaN, you can alternatively use: <xsl:if test="number(@FieldA) = number(@FieldA)"> ... </xsl:if> This works because NaN is the only number for which $num = $num is false. Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] XSLT number() problem, Thomas B. Passin | Thread | RE: [xsl] XSLT number() problem, Andrew Welch |
Re: AW: [xsl] Writing a stylesheet , Mike Brown | Date | Re: [xsl] Hello World, Mike Brown |
Month |