Bug 17830 - FOP0.20.5rc and keep-together=>retrieve-marker doesn't work correctly
Summary: FOP0.20.5rc and keep-together=>retrieve-marker doesn't work correctly
Status: CLOSED DUPLICATE of bug 16999
Alias: None
Product: Fop - Now in Jira
Classification: Unclassified
Component: general (show other bugs)
Version: 0.20.5
Hardware: PC other
: P3 critical
Target Milestone: ---
Assignee: fop-dev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-03-10 15:47 UTC by Joachim Unger
Modified: 2012-04-01 13:50 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joachim Unger 2003-03-10 15:47:47 UTC
I use two markers in a fo:table to retrieve sums that should be place in the 
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_AMOUNT+s
um(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
Comment 1 J.Pietschmann 2003-03-10 23:34:54 UTC

*** This bug has been marked as a duplicate of 16999 ***
Comment 2 Glenn Adams 2012-04-01 13:50:14 UTC
batch transition to closed remaining pre-FOP1.0 resolved bugs