xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carsten B." <c.bueh...@xdot.de>
Subject Re: Sobtotal per Page
Date Fri, 17 Jul 2009 10:10:41 GMT

Hi,

I finally i found something. But I have a problem in calling the template.
What ist wrong, can't figure it out.

<!--- Template to calculate Subtotals -->
<xsl:template mode="do-sum" match="Auftrag">
            <xsl:param name="sum" select="0"/>
            <xsl:variable name="running-sum"
                          select="number(translate($sum +
number(Auftragssumme),'.',''))"/>
            <xsl:choose>
                <xsl:when test="following-sibling::Rechnung">
                    <xsl:apply-templates mode="do-sum"
select="following-sibling::Auftrag[1]">
                        <xsl:with-param name="sum" select="$running-sum"/>
                    </xsl:apply-templates>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:value-of select="format-number($running-sum,
'#.##0,00', 'numfrmt')"/>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:template>
        <xsl:template name="getSubtotal">
                Subtotal:
               <!-- <xsl:apply-templates mode="do-sum"
select="/Root/Rechnung/Auftrag[1]"/>-->
        </xsl:template>
<!-- End Template calculating subtotals -->




            <fo:layout-master-set>
                <fo:simple-page-master master-name="Rechnung"
page-width="8.5in" page-height="11in">

                    <fo:region-body region-name="PageBody"
margin-top="1.5in" margin-left="0.8in"
                                    margin-bottom="0.8in"/>
                    <fo:region-before region-name="Header" extent="1.2in"
margin-left="0.8in"/>
                    <fo:region-after region-name="Footer" extent="1in"/>
                </fo:simple-page-master>
            </fo:layout-master-set>
            <fo:page-sequence master-reference="Rechnung">
                <!-- Rechnungsnumemr und Seitenzahl-->
                <fo:static-content flow-name="Header">
                  [...]
                </fo:static-content>

                <!-- Footer -->
                <!--<fo:static-content flow-name="Footer"> -->
                <fo:static-content flow-name="Footer">
                      <fo:block-container position="absolute" left="4.65in"
top="40%" height="1in" width="100%">
                        <!--  <fo:retrieve-marker
retrieve-class-name="title"
                       retrieve-position="first-starting-within-page"
                       retrieve-boundary="page"/> -->

                        <fo:block font-size="9pt">Zwischensumme:
                            ### Call Template ####
                            <xsl:call-template name="getSubtotal"/>
                        </fo:block>

                    </fo:block-container>
                </fo:static-content>
                <!--</fo:static-content>-->
                <!-- Footer Ende -->


I don't know what wrong and where zo put my templates. Everytime I get
"the-template-could-not-be-found".


I skipped dealing with markers, because I couldn't figure out how to call
the "last marker" on a page.

Sorry about this nooby questions.


-- 
View this message in context: http://www.nabble.com/Sobtotal-per-Page-tp24519516p24531834.html
Sent from the FOP - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Mime
View raw message