- From: <Jarno.Elovirta@nokia.com>
- Date: Thu, 17 Apr 2003 09:12:36 +0300
- To: <kryoshida@sweetheart.com>, <www-xsl-fo@w3.org>
Hi, > I want to group and sub-total based on a SBU - Strategic Business Unit: [snip] > There are 4 different SBU's and I want to sub-total at the end of each SBU. How can I do this? <xsl:key name="sbu" match="Customer" use="SBU" /> <xsl:template match="*[Customer]"> <xsl:for-each select="Customer[generate-id(.) = generate-id(key('sbu', SBU))]"> <fo:block> <xsl:for-each select="key('sbu', SBU)"> <fo:block> <xsl:value-of select="CustomerNumber" /> </fo:block> ... </xsl:for-each> </fo:block> <fo:block> <xsl:text>sub-total: </xsl:text> <xsl:value-of select="sum(key('sbu', SBU)/PostInc)" /> </fo:block> </xsl:for-each> </xsl:template> XSL-List at <http://mulberrytech.com/xsl/xsl-list/> is usually a better place to ask XSLT related questions. Cheers, Jarno - VNV Nation: Procession
Received on Thursday, 17 April 2003 02:14:51 UTC