|
Subject: RE: [xsl] xml to xml transformation From: Jarno.Elovirta@xxxxxxxxx Date: Fri, 16 May 2003 09:20:29 +0300 |
Hi,
> My problem is that I want to Sum the total of all the Batches
> belonging to each Entity(including its Sub-Entities). For
<xsl:template match="Entity">
<xsl:copy>
<xsl:apply-templates select="node()"/>
<Sum>
<xsl:value-of select="sum(descendant::TotalAmount)"/>
</Sum>
</xsl:copy>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
> how chould I go about it. In a programming world, this would
> be achieved through recursive functions. How Would I do this in XSLt.
You can use recursive template calls in XSLT--though in this case you need not.
Cheers,
Jarno - Dulce Liquido: Psicosis
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Re: [xsl] xml to xml transformation, karan bhasin | Thread | [xsl] blockQuotes to blockQuote p p, Jim_Albright |
| RE: [xsl] Auto-Numbering with condi, Jarno . Elovirta | Date | RE: [xsl] Using or ignoring Types i, David . Pawson |
| Month |