|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Calculations in XSL
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








