W3C home > Mailing lists > Public > www-xsl-fo@w3.org > April 2003

Re: Subtotals

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Tue, 22 Apr 2003 19:10:19 -0400
Message-Id: <5.2.0.9.0.20030422190734.02401e78@pop.storm.ca>
To: "'www-xsl-fo@w3.org'" <www-xsl-fo@w3.org>

At 2003-04-22 16:47 -0400, G. Ken Holman wrote:
>At 2003-04-22 16:07 -0400, Yoshida, Ken wrote:
>>I would like to achieve the following
>>
>>SBU     CustomerNumber           Customer          PostIncPrice
>>F          1234                             Cust1                1.00
>>F          2345                             Cust2                2.00
>>                                                                         3.00
>>...
>>I have a key:
>>
>><xsl:key name="sbu" match="Customer" use="SBU" />
>>
>>Doing to "for-each selects" as follows using two tables row:
>>
>><xsl:for-each select="Customer[generate-id(.) = generate-id(key('sbu', 
>>SBU))]">
>><xsl:for-each select="key('sbu', SBU)">
>>
>><fo:table-row border-width="0.5pt" break-after="page">
>>...
>></fo:table-row>
>></xsl:for-each>
>
><fo:table-row
>   <fo:table-cell
>     <xsl:value-of select="format-number( '0.##', sum(key('sbu',SBU)))"/>

Sorry, that should have been:

     <xsl:value-of select="format-number( sum(key('sbu',SBU)), '0.00' )"/>

............... Ken

--
Upcoming hands-on courses:   Europe (XSLT/XPath):    May  5, 2003
-                            Europe (XSL-FO):        May 16, 2003
- (XSLT/XPath and/or XSL-FO) North America:      June 16-20, 2003

G. Ken Holman                mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.         http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0   +1(613)489-0999 (F:-0995)
ISBN 0-13-065196-6                      Definitive XSLT and XPath
ISBN 0-13-140374-5                              Definitive XSL-FO
ISBN 1-894049-08-X  Practical Transformation Using XSLT and XPath
ISBN 1-894049-10-1              Practical Formatting Using XSL-FO
Male Breast Cancer Awareness http://www.CraneSoftwrights.com/f/bc
Received on Tuesday, 22 April 2003 19:10:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 3 October 2007 16:06:10 GMT