RE: [xsl] Page break help

Subject: RE: [xsl] Page break help
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Tue, 13 May 2008 15:30:27 -0400
At 2008-05-13 15:15 -0400, Ferry, Jeremy wrote:
What I'm trying to say is that I can fit 5 records plus my content block
on a page. So, if there are more than 5 records (there can't be more
than 7 because it's the last group and 7 is my group size), put the
content block on a new page. I'm not actually breaking up the group, I'm
just testing to see if I can fit all the records in the last group plus
the content block on a single page. If not than insert a page break and
put the content block on a fresh page. Does that make sense?

Oh! If that is all you are trying to do, then wrap your content block with:


  <fo:block keep-together.within-column="always">
   ...content blocks here...
  </fo:block>

Then if the formatter cannot fit the entire set of content blocks on a single page, that infers a page break without you having to do anything. If it does fit, nothing happens, because it is all being "kept together" within the specified context.

Trying to engineer page breaks on a measured running page position is against the spirit of XSL-FO and, hence, very difficult to get to work well.

I hope this helps.

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


-- World-wide corporate, govt. & user group XML, XSL and UBL training RSS feeds: publicly-available developer resources and 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 Cancer Awareness Nov'07 http://www.CraneSoftwrights.com/s/bc Legal business disclaimers: http://www.CraneSoftwrights.com/legal

Current Thread