[xsl] XSL-FO multiple page headers

Subject: [xsl] XSL-FO multiple page headers
From: "Michael Rerick" <rerickm@xxxxxxxxxxxxxxxx>
Date: Mon, 1 Aug 2005 14:47:01 -0700
Hi all. I have run into a problem generating report headers
(static-content - xsl-region-before) on a multi page report.

I have a multi page report that has three "types" of pages. The layout of
all three pages is the same. The region-body and region-after are the same
for all of the pages. The only difference is the region-before is slightly
different on the three page types.

Currently all of the pages print with the same header, detail and footer.
The flow does a page break after all of the detail and summary by type
elements have been processed (fo:block break-after="page"). There is one
simple-page-master, one page-sequence-master and one page-sequence with
static-content for the xsl-region-after and xsl-region-before with one flow.
In the flow, there is a series of xsl:if statements that check to see if
there are any detail, summary by type or summary elements in the XML. If
there are, then there is an apply:templates inside the if that will process
all elements of that type.

 I'm using Cocoon and Apache FOP to generate the PDF file.

The report prints all of its detail pages, then  summary by type page(s),
then a one page summary. The only difference between these pages are in the
report header. The detail page(s) has just a one line report header at the
top of every page ('Report Title'). The summary by type page(s) need to have
a two line report header: 'Report Title' on the first line and 'Summary by
Type' on the second line, under 'Report Title'. The summary page needs to
have a two line report header: 'Report Title' on the first line and
'Summary' on the second line, under 'Report Title'.

I can create a page-sequence with conditional-page-master-references that
have @page-position = last or rest. My question is: how can I create one for
the the Summary by Type pages. These pages aren't first, last or any. I have
no idea how may detail pages there are or how many Summary by Type pages
there are. It varies from 1, 1, 1 to x, x, 1 pages.


What I need in the output:
  Detail pages (1-x pages) with the region-before containing 'Report Title'
+ date, and column headers; region-body contains the report data in a table
format; region-after contains a footer that has to print on every page
(could be structured so that there is a blank subheading on the line under
'ReportTitle'

 Summary by Type page(s) (1-x pages) with region-before containing 'Report
Title' + "Summary by Type' on line under 'Report Title' + date + column
headers; region-body contains the report data in a table format;
region-after contains a footer that has to print on every page

 Summary page (1 page) with region-before containing 'Report Title' +
"Summary' on line under 'Report Title' + date + column headers; region-body
contains the report data in a table format; region-after contains a footer
that has to print on every page

I have looked at the fo:marker and fo:retrieve-marker elements but am not
sure that they would work.

Thanks for any assistance.
Mike Rerick

----------------------------------
The ODS Companies
Michael Rerick
Sr. Programmer Analyst
(503) 228-6554  x5741
http://www.odscompanies.com

This message is intended for the sole use of the individual and entity to
whom it is addressed, and may contain information that is privileged,
confidential and exempt from disclosure under applicable law. If you are not
the intended addressee, nor authorized to receive for the intended
addressee, you are hereby notified that you may not use, copy, disclose or
distribute to anyone the message or any information contained in the
message. If you have received this message in error, please immediately
advise the sender by reply email and delete the message.

Current Thread