Re: [xsl] XSLT 1.0 newbie: sum of selected elements

Subject: Re: [xsl] XSLT 1.0 newbie: sum of selected elements
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 11 Dec 2006 14:29:33 GMT
> Is't possible, for this
> example, elements with @id 2 or 3 to be selected first and after to be
> summarized @due and/or @init?

just what variables are for:

<xsl:variable name="x" select="..//element[type/@id[.=2 or .=3]/amount"/>
<xsl:value of select="sum($x/@due)"/>
<xsl:value of select="sum($x/@init)"/>

David

Current Thread