[xep-support] Long Tables and Titles

G. Ken Holman gkholman at CraneSoftwrights.com
Mon Jun 22 09:56:35 PDT 2009


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>
></fo:block>
></xsl:template>
>
>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.          http://www.CraneSoftwrights.com/f/
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:    http://www.youtube.com/watch?v=PrNjJCh7Ppg&fmt=18
Video overview:  http://www.youtube.com/watch?v=VTiodiij6gE&fmt=18
G. Ken Holman                 mailto:gkholman at CraneSoftwrights.com
Male Cancer Awareness Nov'07  http://www.CraneSoftwrights.com/f/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

-------------------
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to majordomo at renderx.com from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/terms-of-service.html



More information about the Xep-support mailing list