Re: [xep-support] RE: trouble with keep with next

From: G. Ken Holman <>
Date: Wed Aug 22 2007 - 05:41:16 PDT

At 2007-08-21 17:48 -0400, Jerry Janofsky wrote:
>I realize my attempt to simplify my problem might have made my
>pseudo code in my previous email unclear because I didn't really
>show the templates involved.

The templates don't really help very much. How you get the XSL-FO
you need is not important ... the question is which XSL-FO do you need.

>You can assume the blocks are called multiple times within an XSL
>template. I have just a single line that must be able to span the
>whole page if necessary. The <rx:flow> section below it contains 3
>columns that can flow over multiple pages. I just need a way to
>make sure the first block is never the last item on a page. The code
>looks more like this below.

Can you create just a standalone XSL-FO instance that shows that your
desired code does not work? This would be an XML document with
<fo:root> as the document element where the particular count of
blocks in your test either proves or disproves your ability to use a
particular set of formatting objects. The XSLT that gets you there
is not really relevant unless it is an algorithmic problem for
creating the formatting objects themselves. You are asking about
formatting properties.

> <xsl:for-each-group select="current-group()"
> group-by="dir:persondata">
> <xsl:sort select="current-grouping-key()"/>
> <fo:block
> keep-with-next.within-column="always">

You are using ".within-column" yet your problem statement is "never
the last item on a page". Is the problem you are focusing on that a
column-break is not triggering a page break?

>Sent: Sunday, August 19, 2007 7:36 PM
>To: ''
>Subject: trouble with keep with next
>In my code below, is it possible to be certain the first block is
>never the last item in a page body? I just want to make sure that
>the data in the first block is ever the last item on a page.

Given that you have multiple columns, then is your concern a
particular item breaks a column but not a page?

>The data in the flow section may be more or less than a full page
>worth of data. I am using XEP 4.6 (might be 4.7, but I don't know
>how to find out).

Just invoke the process without any arguments and you should see the
version number displayed in the output.

>The documentation says that keep-with-next.within-page="always"
>isn't supported.

Yes, I read that as well ... perhaps your problem is insoluble given
this restriction (which seems very explicit in the documentation).

>I've tried various keep-together things. I've run into this issue before.

Do you have example XSL-FO from that earlier time?

I hope this helps.

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

Upcoming public training: XSLT/XSL-FO Sep 10, UBL/code lists Oct 1
World-wide corporate, govt. & user group XML, XSL and UBL training
RSS feeds:     publicly-available developer resources and training
G. Ken Holman       
Crane Softwrights Ltd.
Box 266, Kars, Ontario CANADA K0A-2E0    +1(613)489-0999 (F:-0995)
Male Cancer Awareness Jul'07
Legal business disclaimers:
(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
Received on Wed Aug 22 07:13:50 2007

This archive was generated by hypermail 2.1.8 : Wed Aug 22 2007 - 07:13:51 PDT