Re: [xsl] Getting a block to end on the last page

Subject: Re: [xsl] Getting a block to end on the last page
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 01 Dec 2011 11:05:41 -0500
At 2011-12-01 04:53 -0600, Colin DeClue wrote:
The thing I probably didn't make clear is that i don't know how many
pages the full thing will be, or how many pages the charges will take
up, without a fairly heavy amount of pre-processing.

Why do you need to know the total number of pages? If you want the page number of the last page, say for "page 1 of n" on each page, that is done with <page-number-citation-last> in XSL-FO. That is the only reason I can think of for you to want to know ahead of time what the last page number is.


So, I could do it
that way, but I wanted to see if there was an easier way to do it with
XSL-FO.

"Easier" than what?


If you start flowing your invoice items on page 2, then they will continue to flow on subsequent pages.

When you run out of data you are flowing into your page sequences, you will be, by definition, on the last page. This is what I didn't understand from your first post when you said:

> At 2011-12-01 09:38 -0600, Colin DeClue wrote:
>>
>> Hey, so, I've got some data (a list of charges for an invoice) that I
>> want to end on the last page, rather than start on the first.

You can start flowing the invoice lines at any time ... when you are done, you will be on the last page.


If you are worried about splitting an invoice line over a page break, that is prevented by wrapping your invoice line with a "keep".

Forgive me for not understanding what it is you want to do, or where you are not understanding the process.

. . . . . . . . . . Ken

--
Contact us for world-wide XML consulting and instructor-led training
Free 5-hour video lecture: XSLT/XPath 1.0 & 2.0 http://ude.my/t37DVX
Crane Softwrights Ltd.            http://www.CraneSoftwrights.com/s/
G. Ken Holman                   mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Google+ profile: https://plus.google.com/116832879756988317389/about
Legal business disclaimers:    http://www.CraneSoftwrights.com/legal

Current Thread