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

Subtotals

From: Yoshida, Ken <kryoshida@sweetheart.com>
Date: Tue, 22 Apr 2003 16:07:38 -0400
Message-ID: <CC7A48091A69D311BF760001FA7E61C20AC85570@exchange.sweetheart.com>
To: "'www-xsl-fo@w3.org'" <www-xsl-fo@w3.org>
I would like to achieve the following
 
SBU     CustomerNumber           Customer          PostIncPrice
F          1234                             Cust1                1.00
F          2345                             Cust2                2.00
                                                                        3.00
 
B          4567                             Cust3                0.50
                                                                        0.50
 
C          5746                             Cust4                2.00
C          9876                             Cust5                1.50
C          8756                             Cust6                3.00
                                                                        6.50
 
 
XML is as follows:
<PriceDiscrepancy/>
   <Customer/>
            <CustomerNumber/>
            <Customer/>
            <SBU/>
            <PostIncPrice/>
 
 
I am creating a table and filling the cells as such:
<fo:table-cell padding-top="1pt">
            <xsl:for-each select="/PriceDiscrepancy/Customer">
                 <fo:block font-family="Helvetica" font-size="9pt">
                        <xsl:value-of select="SBU"/>
                 </fo:block>
            </xsl:for-each>
</fo:table-cell>
 
 
 
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 border-width="0.5pt" break-after="page">
...
</fo:table-row>
</xsl:for-each>
 
 
It's not working!  Help please.  I had help from Jarno!  Thanks Jarno!
Can't seem to get any farther.
 
 
 
Received on Tuesday, 22 April 2003 16:13:11 GMT

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