[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
HS wrote:
No way. A FO formatter can't do such calculations.
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Re: [xsl] maker and retrieve-marker question
Subject: Re: [xsl] maker and retrieve-marker question From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Sat, 01 Mar 2003 17:49:43 +0100 |
HS wrote:
I am having a problem in using the marker and retrieve-marker to calculate page subtotals.
... > then, in the same static block, i want to show the > result of the > subtraction of those two variables from each other,...
You are mixing transformation and formatting. These are two different steps.
<xsl:variable name="previous_cumulative_total"> <fo:retrieve-marker retrieve-class-name="previous_cumulative_total_marker" retrieve-boundary="page" retrieve-position="first-starting-within-page"/> </xsl:variable>
Here you have a variable holding an RTF with basically an element node for a fo:retrieve-marker element. This can be copied through to the output into the FO document, as you discovered:
Now, if i do <xsl:copy-of select"$previous_cumulative_total"/> , it
shows me the number.
The mechanism is that you got the fo:tretrieve-marker into the FO document, and the FO formatter replaced it during formatting with the retrieved marker, i.e. the subtotal you want to have.
However, page breaking and marker retrieval is done by the FO formatter, *after* the whole XSL transformation run. There is no way to get the retrieved markers during the transformation stage.
and how can i get the result of the subtraction of the
two variables?
No way. A FO formatter can't do such calculations.
is there another way of doing this?
Tricky. You can try to emulate page breaking at the XSLT stage, if your record rows are all of the same height, you precalculate the number of rows per page by hand and put this number in a table, followed by a forced page break.
J.Pietschmann
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Code Generation Possible?, Grainne Reilly | Thread | Re: [xsl] single-level break algori, J.Pietschmann |
RE: [xsl] Code Generation Possible?, Mark Wonsil | Date | Re: [xsl] single-level break algori, J.Pietschmann |
Month |