Subtotaling on columns

I would like to have a subtotal at the end of my document.  How do I do
that?  Here is the code I currently have:
 
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet 
     xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:fo = "http://www.w3.org/1999/XSL/Format"
     version="1.0">
 
<xsl:key name="customer" match="/PriceDiscrepancy/Customer"
use="CustomerNumber"/>
 
<xsl:template match="PriceDiscrepancy">
 
 
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format" 
         xmlns:fox="http://xml.apache.org/fop/extensions">
             
  <fo:layout-master-set>
  <fo:simple-page-master master-name="simple"
                  page-height="30cm" 
                  page-width="28cm"
                  margin-top=".5cm" 
                  margin-bottom="1cm" 
                  margin-left=".5cm" 
                  margin-right=".5cm">
    <fo:region-body margin-top="1.5cm" margin-bottom="0cm"/>
    <fo:region-before extent="4cm"/>
    </fo:simple-page-master>
  </fo:layout-master-set>
 
            <fo:page-sequence master-reference="simple">
                        <fo:static-content flow-name="xsl-region-before">
                          <fo:table>
                          <fo:table-column column-width="26cm"/>
                                    <fo:table-body font-size="10pt"
font-family="sans-serif">
                                        <fo:table-row line-height="12pt"  >
                                                 <fo:table-cell >
                                                      <fo:block
font-size="12pt" font-weight="bold" text-align="center" 
 
font-family="sans-serif"
 
line-height="10pt"
 
space-before.optimum="20pt" >
                                                              Price
Discrepancy Report
                                                      </fo:block>
                                                 </fo:table-cell>
                                        </fo:table-row>
                                    </fo:table-body>
                          </fo:table>
                        </fo:static-content>
 
 
                        <fo:flow flow-name="xsl-region-body">
                <fo:table><!-- border-style="solid" -->
                     <fo:table-column column-width="1.6cm"/>
                     <fo:table-column column-width="7.5cm"/>
                     <fo:table-column column-width="1.5cm"/>
                             <fo:table-column column-width="2.8cm"/>
                             <fo:table-column column-width="4.5cm"/>
                             <fo:table-column column-width="1.5cm"/>
                     <fo:table-column column-width="2.3cm"/>
                     <fo:table-column column-width="2.3cm"/>
                             <fo:table-column column-width="1.3cm"/>
                             <fo:table-column column-width="1.6cm"/>
                             
                     <fo:table-header font-size="8pt"
font-family="sans-serif" background-color="#CCCCCC">
                          <fo:table-row display-align="after">
                              <fo:table-cell 
 
padding-top="1pt"><fo:block text-align="left" font-weight="bold">
                                          Customer Number
                                          </fo:block></fo:table-cell>
                                          
                                          <fo:table-cell 
 
padding-top="1pt"><fo:block text-align="left" font-weight="bold">
                                          Customer Name
                                          </fo:block></fo:table-cell>
                                          
                                          <fo:table-cell 
 
padding-top="1pt"><fo:block text-align="left" font-weight="bold">
                                          Order Number
                                          </fo:block></fo:table-cell>
                                          
                                          <fo:table-cell 
 
padding-top="1pt"><fo:block text-align="left" font-weight="bold">
                                          Item Number
                                          </fo:block></fo:table-cell>
                                          
                                          <fo:table-cell
padding-top="1pt"><fo:block text-align="left" font-weight="bold">
                                          Item Description
                                          </fo:block></fo:table-cell>
                                          
                                          <fo:table-cell
padding-top="1pt"><fo:block text-align="left" font-weight="bold">
                                          Last Order Date
                                          </fo:block></fo:table-cell>
                                          
                                          <fo:table-cell
 
padding-top="1pt"><fo:block text-align="center" font-weight="bold">
                                          Pre-Increase Price
                                          </fo:block></fo:table-cell>
                                          
                                          <fo:table-cell 
 
padding-top="1pt"><fo:block text-align="center" font-weight="bold">
                                          Post-Increase Price
                                          </fo:block></fo:table-cell>
                                          
                                          <fo:table-cell 
 
padding-top="1pt"><fo:block text-align="center" font-weight="bold">
                                          Change Amount
                                          </fo:block></fo:table-cell>
                                          
                                          <fo:table-cell 
                                              padding-top="1pt"><fo:block
text-align="center" font-weight="bold">
                                          Change Percentage
                                          </fo:block></fo:table-cell>
                          </fo:table-row>
                     </fo:table-header>
                             
                     <fo:table-body>
                          <fo:table-row border-width="0.5pt"
break-after="page">
                               <fo:table-cell padding-top="1pt">
                                           <xsl:for-each select="Customer">
                                    <fo:block font-family="Helvetica"
font-size="9pt">
                                                            <xsl:value-of
select="CustomerNumber"/>
                                                    </fo:block>
                                           </xsl:for-each>
                               </fo:table-cell>
                                           
                               <fo:table-cell padding-top="1pt">
                                           <xsl:for-each select="Customer">
                                    <fo:block font-family="Helvetica"
font-size="9pt">
                                                            <xsl:value-of
select="CustomerName"/>
                                                    </fo:block>
                                                    </xsl:for-each>
                               </fo:table-cell>
                                           
                                           <fo:table-cell padding-top="1pt">
                                           <xsl:for-each select="Customer">
                                    <fo:block font-family="Helvetica"
font-size="9pt">
                                                            <xsl:value-of
select="OrderNumber"/>
                                                    </fo:block>
                                                    </xsl:for-each>
                               </fo:table-cell>
                                           
                                           <fo:table-cell padding-top="1pt">
                                           <xsl:for-each select="Customer">
                                    <fo:block font-family="Helvetica"
font-size="9pt">
                                                            <xsl:value-of
select="ItemNumber"/>
                                                    </fo:block>
                                                    </xsl:for-each>
                               </fo:table-cell>
                                           
                                           <fo:table-cell padding-top="1pt">
                                           <xsl:for-each select="Customer">
                                    <fo:block font-family="Helvetica"
font-size="9pt">
                                                            <xsl:value-of
select="ItemDesc"/>
                                                    </fo:block>
                                                    </xsl:for-each>
                               </fo:table-cell>
                                           
                                           <fo:table-cell padding-top="1pt">
                                           <xsl:for-each select="Customer">
                                    <fo:block font-family="Helvetica"
font-size="9pt">
                                                            <xsl:value-of
select="LOD"/>
                                                    </fo:block>
                                                    </xsl:for-each>
                               </fo:table-cell>
                                           
                                           <fo:table-cell padding-top="1pt">
                                           <xsl:for-each select="Customer">
                                    <fo:block font-family="Helvetica"
font-size="9pt" text-align="center">
                                                            <xsl:value-of
select="PreInc"/>
                                                    </fo:block>
                                                    </xsl:for-each>
                               </fo:table-cell>
                                           
                                           <fo:table-cell padding-top="1pt">
                                           <xsl:for-each select="Customer">
                                    <fo:block font-family="Helvetica"
font-size="9pt" text-align="center">
                                                            <xsl:value-of
select="PostInc"/>
                                                    </fo:block>
                                                    </xsl:for-each>
                               </fo:table-cell>
                                           
                                           <fo:table-cell padding-top="1pt">
                                           <xsl:for-each select="Customer">
                                    <fo:block font-family="Helvetica"
font-size="9pt" text-align="right">
                                                            <xsl:value-of
select="ChangeAmount"/>
                                                    </fo:block>
                                                    </xsl:for-each>
                               </fo:table-cell>
                                           
                                           <fo:table-cell padding-top="1pt">
                                           <xsl:for-each select="Customer">
                                    <fo:block font-family="Helvetica"
font-size="9pt" text-align="right">
                                                            <xsl:value-of
select="ChangePercentage"/>
                                                    </fo:block>
                                                    </xsl:for-each>
                               </fo:table-cell>
                          </fo:table-row>
 
                  
                     </fo:table-body>
                        </fo:table>
                             
                        </fo:flow>
            </fo:page-sequence>
</fo:root>
</xsl:template>
 
</xsl:stylesheet>

Received on Friday, 11 July 2003 11:42:12 UTC