Hi!
I use two markers in a fo:table to retrieve sums for page header
(region-before) and footer (region-end).
<for each account position ...>
<table-row keep-together="always" keep-together.within-page="always">
<fo:table-cell>
<fo:block text-align="center" >
<!-- Marker -->
<fo:marker marker-class-name="subtotalvalue">
<xsl:call-template name="soll_haben">
<xsl:with-param name="text">�bertrag</xsl:with-param>
<xsl:with-param name="amount">
<xsl:choose>
<xsl:when test="A_AMOUNT!=''">
<xsl:value-of
select="/ACCOUNTDOCUMENT/ACCOUNTSTATEMENT/TOTALSANDLIMITS/@A_SBALANCE+A_AMOU
NT+sum(preceding::A_AMOUNT[.!=''])"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of
select="/ACCOUNTDOCUMENT/ACCOUNTSTATEMENT/TOTALSANDLIMITS/@A_SBALANCE +
sum(preceding::A_AMOUNT[.!= ''])"/>
</xsl:otherwise>
</xsl:choose>
</xsl:with-param>
<xsl:with-param name="currency"
select="/ACCOUNTDOCUMENT/ACCOUNTSTATEMENT/ACCOUNTHEADER/@CURRENCY"/>
</xsl:call-template>
</fo:marker>
<fo:marker marker-class-name="subtotalvalueEx">
<xsl:call-template name="soll_haben">
<xsl:with-param name="text">�bertrag</xsl:with-param>
<xsl:with-param name="amount">
<xsl:value-of
select="/ACCOUNTDOCUMENT/ACCOUNTSTATEMENT/TOTALSANDLIMITS/@A_SBALANCE +
sum(preceding::A_AMOUNT[.!= ''])"/>
</xsl:with-param>
<xsl:with-param name="currency"
select="/ACCOUNTDOCUMENT/ACCOUNTSTATEMENT/ACCOUNTHEADER/@CURRENCY"/>
</xsl:call-template>
</fo:marker>
... other output like A_AMOUNT ...
To get the sum for the footer :
<fo:retrieve-marker
retrieve-class-name="subtotalvalue"
retrieve-boundary="page"
retrieve-position="last-starting-within-page"/>
To get the sum for the header :
<fo:retrieve-marker
retrieve-class-name="subtotalvalueEx"
retrieve-boundary="page"
retrieve-position="first-starting-within-page"/>
Some accountpositions have payment-notes, that are added as additional
table-rows :
<fo:table-row>
<xsl:attribute
name="keep-with-previous.within-page">always</xsl:attribute>
<xsl:attribute name="keep-with-previous">always</xsl:attribute>
... payment - note ...
What happened is that FOP keeps blocks correctly together. (Accountposition
and payment-notes should not be on separate pages)
But <fo:retrieve-marker> sometimes fetches wrong values (from previous /
following lines).
As a result the sum on a page and their following may differ.
Is that behavior a ( known ) mistake ?
Regards
Joachim Unger
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]