Re: [xsl] FO: keep strength with larger than a page content

Subject: Re: [xsl] FO: keep strength with larger than a page content
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 19 Aug 2004 22:46:08 -0400
At 2004-08-19 16:59 +0300, Jarno.Elovirta@xxxxxxxxx wrote:
Simply, is there a way around <http://www.dpawson.co.uk/xsl/sect3/keepsNbreaks.html> "[I]n XSL-FO 1.0 there is no way to have an item that is too long for a page begin at the top of a page"?

How do people usually handle cases where table rows or list items contain more content that what will fit into a single page, but still want to keep the content together in smaller rows and list items? Do you try to "artificially" create break-points by chopping the content into blocks that will most probably fit into a single page?

I hope I've understood your question, because I believe XSL-FO supplies the answer.


The idea of "keep strength" allows you to wrap smaller portions of your flow with higher strengths. As blocks of content with low strength values break because they don't fit on a page, smaller blocks with higher values of strength are the next "breaking points" for blocks of flow.

You could nest a flow with a keep-together="1" with consecutive flows of keep-together="2" where you will allow breaks only if necessary, and then break up any flow with keep-together="2" with consecutive flows of keep-together="3" where you will allow breaks in those only if necessary, and so on.

The catch is that I don't think any of the engines implement numeric values of keep strength and they only support "always" ... which has a different semantic than "a very big number". If you use "always" and it doesn't fit, then it is considered a runtime overflow error.

I hope this helps.

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

--
World-wide on-site corporate, govt. & user group XML/XSL training.
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/s/
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Breast Cancer Awareness  http://www.CraneSoftwrights.com/s/bc
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Current Thread