[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: maker and retrieve-marker question

Subject: Re: maker and retrieve-marker question
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Sat, 01 Mar 2003 17:49:43 +0100
retrieve marker
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.