[xep-support] Long Tables and Titles

Bob Stayton bobs at sagehill.net
Mon Jun 22 15:39:17 PDT 2009


You could wrap the title and table in another fo:block that has the 
keep-together.within-page property, and remove the other keeps.

Bob Stayton
Sagehill Enterprises
bobs at sagehill.net


----- Original Message ----- 
From: "Craig S. Booher" <CraigSBooher at athenet.net>
To: <xep-support at renderx.com>
Sent: Monday, June 22, 2009 3:11 PM
Subject: Re: [xep-support] Long Tables and Titles


> Ken,
>
> Thanks for the reply.  Apparently I am confused about the function of 
> keep.  I understood that keep would force the first block to appear on the 
> same page with the subsequent block.  Since the long table needs to break 
> across several pages, anyway, I assumed the keep would push the title to 
> the next page so that it appeared immediately before the table block and 
> then break the table across the page where ever it need to.
>
> I don't believe I'll be able to use either of the other two options 
> (table-caption or table-header) as the document structure has been set.
>
> Any other thoughts?
>
> Thanks again.
>
> Craig
>
> G. Ken Holman wrote:
>> 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
>>
>>
>
> -- 
> Craig S. Booher
> XSLent Solutions
> 920-540-5563
>
> -------------------
> (*) 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
>
> 

-------------------
(*) 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