[xsl] Page break help

Subject: [xsl] Page break help
From: "Ferry, Jeremy" <Jeremy_Ferry@xxxxxxxxxxxx>
Date: Mon, 12 May 2008 13:20:59 -0400
I've got a document who's content is a table that contains rows of
product line items. I'm using groups to break the product line items
into pages. At the very end of the product line items (on the last page)
I need to print a block of content. Currently I'm simply making the
group size small enough to make room for the block of content on the
last page but this has the undesirable side effect of not filling up the
available space on all previous pages.

For example, I can fit 7 records on a page but I need to put a block
after the last group that takes up the space of 2 records. So what I'm
trying to do is force a page break if the last group contains more than
5 records but all the previous pages should fit 7 records...

		<xsl:if test="position() = last()">

			<xsl:if test="count(current-group()) &gt; 5">
				<fo:block break-before="page"/>
			</xsl:if>

			content block to follow last group goes here...

		</xsl:if>

The <fo:block break-before="page"/> IS getting included in the output
but the page break is not happening. Am I doing something wrong? Maybe
I've just misunderstood how page breaks work?

Jeremy Ferry
Sr. Software Engineer
Sterling Commerce, an AT&T company
Eden Prairie, MN

Current Thread