Re: [xep-support] Long Tables and Titles

From: G. Ken Holman <>
Date: Mon Jun 22 2009 - 09:56:35 PDT

At 2009-06-22 10:28 -0500, Craig S. Booher wrote:
>Whenever a table is longer than one printed page, the table title
>appears at the top of an initial page but the table contents don't
>display until the beginning of the subsequent page.

Yes, that is the behaviour I would expect because you've used keep-with-next.

>I've used:
><xsl:template match="table">
> <fo:block margin="12pt" id="{generate-id(.)}" >
> <xsl:if test="title">
> <fo:block keep-with-next.within-page="always">
> other stuff
> </fo:block>
> </xsl:if>
> <fo:block keep-with-previous.within-page="always" widows="3" orphans="3">
> <fo:table width="100%" keep-together.within-column="always"
> widows="3" orphans="3">
> other stuff
> </fo:table>
> </fo:block>
>as well as other variations on the keep-with-next/previous property.

If there is no room for everything, it is unclear to me why you would
expect everything to fit.

>Tables shorter than one page have correct placement of title and
>table contents (i.e., no page breaks after the title).
>Can anyone shed some light on the source of my problem

When a keep condition cannot be met, the keep is broken. You have
two keeps: the keep of the title with the table and the keep of the
table together. The first one, the keep of the title with the table
breaks, so the title is on one page and the table goes to the
next. Then the table with the keep doesn't fit and so that keep is
broken. But the formatter has already moved on to the next page.

>and recommend a solution?

Have you considered using <table-caption> for your title?

Have you considered using <table-header> for your title?

Then in both cases you are only dealing with keep conditions for the
table construct itself and not a preceding block.

I hope this helps.

. . . . . . . . . Ken

Crane Softwrights Ltd.
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:
Video overview:
G. Ken Holman       
Male Cancer Awareness Nov'07
Legal business disclaimers:
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
Received on Mon Jun 22 10:40:44 2009

This archive was generated by hypermail 2.1.8 : Mon Jun 22 2009 - 10:40:46 PDT