|
Subject: Re: Calculations in XSL From: "Jon Smirl" <jonsmirl@xxxxxxxxxxxx> Date: Mon, 25 Oct 1999 10:39:52 -0400 |
From: Alex Pibworth <alex@xxxxxxxxxx>
> I need to add two values together, both are attributes. I have seen
several
<xsl:variable name="a" select="number('2')"/>
<xsl:variable name="b" select="number('5')"/>
<xsl:variable name="sum" select="$a + $b"/>
sum is <xsl:value-of select="$sum"/>
To access an attribute:
<mytag myattrib="9"/>
<xsl:variable name="a" select="number(mytag/@myattrib)"/>
This is using the current XSLT spec. The Microsoft engine is a year out of
date.
Jon Smirl
jonsmirl@xxxxxxxxxxxx
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Calculations in XSL, Alex Pibworth | Thread | Re: Calculations in XSL, David Carlisle |
| Calculations in XSL, Alex Pibworth | Date | Re: Calculations in XSL, David Carlisle |
| Month |