RE: Calculations in XSL

Subject: RE: Calculations in XSL
From: "Alex Pibworth" <alex@xxxxxxxxxx>
Date: Mon, 25 Oct 1999 17:05:53 +0100
>This is using the current XSLT spec. The Microsoft engine is a year out of
>date.

Thank you Jon, but I still get 'Keyword xsl:variable may not be used here.'

You say you are using the current XSLT spec - maybe that is what is wrong
with my document.  I am linking to:

<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl";
xmlns:HTML="http://www.w3.org/Profiles/XHTML-transitional";>

Is this now out of date?

cheers alex




-----Original Message-----
From: owner-xsl-list@xxxxxxxxxxxxxxxx
[mailto:owner-xsl-list@xxxxxxxxxxxxxxxx]On Behalf Of Jon Smirl
Sent: Monday, October 25, 1999 3:40 PM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: 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


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread