xsl-list
[Top] [All Lists]

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

2006-12-11 07:53:06


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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--