W3C home > Mailing lists > Public > www-xsl-fo@w3.org > June 2002

Re: pagination overflow

From: G. Ken Holman <gkholman@CraneSoftwrights.com>
Date: Tue, 11 Jun 2002 08:02:31 -0400
Message-Id: <>
To: www-xsl-fo@w3.org

(this is a repost of my answer yesterday to this question when it was 
posted on the Yahoo list in case anyone on the W3C list benefits from the 
solution presented)

At 2002-06-10 17:40 -0400, Brian Bohl wrote:
>I have a table in the body of the page. Depending on
>the amount of data in the xml, it will overflow to the
>second page. However, on the second page I need a
>different header than what was on the first page. I am
>able to produce a second page, but only with the first
>page's header. Is it possible to have a different
>header on the second page,

No, I believe this is not possible in XSL 1.0 because page geometry
selection (where headers and footers are located on the page) is based on
your XSLT producing sequences of pages, not based on the content of the page.

However ... I have a suggestion if all the stars align:

If your table always starts at the top of a new page, and the content after
the table starts at the top of the following page (admittedly may not meet
your needs, but I don't know your needs) then you can use the custom PSMI
(Page Sequence Master Interleave) formatting semantic that is a free
resource in our Resource Library linked from our home page.  This semantic
is implemented in pure XSL-FO through use of a supplied XSLT stylesheet.

It was designed to accommodate landscape tables in portrait content easily
through a two-step process (the second step being supplied) instead of the
stylesheet writer having to do contortions to break up the resulting flow
into separated page sequences.

To take advantage of the PSMI semantic in your situation, you would wrap
your table in a psmi:page-sequence construct and supply the headers and
footers for use in that particular page sequence with a conditional header
being different on the first page from the subsequent pages.  The
psmi:page-sequence is an immediate child of your fo:flow in your
fo:page-sequence and is easily added to the flow by your XSLT
stylesheet.  Our PSMI stylesheet breaks up a page sequence with the PSMI
construct into three page sequences (one before, the PSMI sequence, and one
after) using only FO constructs ... this way PSMI works with all XSL-FO
engines that conform to the Rec.

Of course, as I said, if the stars do not align quite right then you may
find PSMI doesn't fit your needs.  Also, if your XSLT does accommodate you
creating separate pages sequences for your table from the content before
and after the table, then do that directly without using PSMI.

I hope this helps.

....................... Ken

Upcoming: 3-days XSLT/XPath and/or 2-days XSL-FO:Sep 30-Oct 4,2002

G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
Box 266, Kars, Ontario CANADA K0A-2E0  +1(613)489-0999 (Fax:-0995)
ISBN 0-13-065196-6                       Definitive XSLT and XPath
ISBN 1-894049-08-X   Practical Transformation Using XSLT and XPath
ISBN 1-894049-07-1                Practical Formatting Using XSLFO
XSL/XML/DSSSL/SGML/OmniMark services, books (electronic, printed),
articles, training (instructor-live,Internet-live,web/CD,licensed)
Next public training:     2002-06-11,13,14,08-05,26,27,09-30,10-03
Received on Tuesday, 11 June 2002 08:03:39 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:26 UTC