logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

Re: Changing Pages Based on Content?: msg#00018

Subject: Re: Changing Pages Based on Content?

> * Each consecutive Account Information section commences on a new page.
> * Each page with Account Information on it should contain:
>     1) Account Section header, with Page Number
>     2) Sub-account details
>     3) Account Total

> Any ideas? I gather that there is probably a way to do it using
> page-masters, but I have not had any experience with these yet.

You'll get an opportunity to learn about a number of features of FO in
solving your problem.  A comprehensive solution with explainations would
be a substantial email and a disservice to you, don't you think?

Try googling for one of the many excellent tutorials on the web.

http://www.google.com/search?q=xsl+fo+tutorial

Here are a few hints to get you started:

You'll use static-content in the xsl-region-before for the page header,
you can solve your running total problem the same way in xsl-region-after
if it is to appear on each page.  If your summary page does not get these,
you'll need to define a different named page-sequence for it without those
features.

To get your breaks where you want them you can put each subaccount detail
into a separate table qualified with a keep-together property.

Running page numbers x of y is a standard problem with a standard
solution:

Page <fo:page-number/> of <fo:page-number-citation 
ref-id="{name-of-last-block-on-last-page}"/>

I use an empty block with an id="endofdoc" attribute at the end of my
xsl-region-body flow to kick this off.  The page-number-citation is also
used to build cross-references, indexes and TOC pages.

Of course, you'll use some XSL control constructs or some recursive logic
to decide when your account details are used up and it is time to kick out
the summary page.

Have fun.

----------------------------------------------------------------
Mike Haarman
mhaarma@xxxxxxxxxxxxxx




<Prev in Thread] Current Thread [Next in Thread>