This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: A - B
- From: "Michael Leditschke" <mike at ammd dot com dot au>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 23 Aug 2002 10:08:53 +1000
- Subject: RE: [xsl] A - B
- Reply-to: xsl-list at lists dot mulberrytech dot com
Typically there's some special value you want
in the case where A and/or B don't exist or
are not numeric.
One trick I've used in this case is
<xsl:decimal-format NaN="0"/>
and
<xsl:variable name="fred" select="format-number(A-B)"/>
This way you get "0" if the result is NaN.
HTH
Michael
> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of pcoustillas
> Sent: Friday, 23 August 2002 1:44 AM
> To: mulberrytech
> Subject: [xsl] A - B
>
>
> hi, how could i do A-B when A or B does not exist or is absent...
> because without a test i recieve "NaN". Thanks.
>
>
> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
>
>
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list