Re: [xsl] Widows and orphans in XSL-FO

Subject: Re: [xsl] Widows and orphans in XSL-FO
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 30 Oct 2009 19:50:43 -0400
At 2009-10-30 15:33 -0700, Mark Wilson wrote:
I looked at that function and am not sure if it would be useful or not. However, a Google search on it did lead me to within-page. The article warned that FOP (which I am using) did not support this, but found me a free download of XEP.
When I tried to run my stylesheet, XEP failed on the current-time() function from XSLT. I could get along without that, but then it failed on the base-uri(/) function,

You are not obliged to use the XSLT processor in XEP ... just use any XSLT 2.0 processor (I have great success with Saxon) to produce your XSL-FO from your XML, and then pass the raw XSL-FO to XEP for formatting.

which is necessary, so that XEP seems dead unless there is a way to get XEP to recognize these functions. I'll look around for an XEP list. mailto:xep-support-request@xxxxxxxxxxx?body=subscribe

Thanks again, even though my problem is still unresolved.

Your original post wasn't clear enough for me to understand, even with your bit at the bottom of the message.

On Fri, Oct 30 2009 18:19:34 +0000, mark@xxxxxxxxxxxx wrote:
I am compiling a journal index. The output is generated via XSLT and
XSL-FO. I have been looking for a way to deal with widows and orphans
in XSL-FO, but all of the information I have found seems to be focused
on breaks *within* an <fo:block>rather than *between*
different<fo:block>s. My problem is that I only want to end a page if
the processor has started rendering (or has completed rendering), a
specific <fo:block>,

That to me sounds like a keep constraint, which correlates with your own discovery of the "within-page":


... is what I tell my XSL-FO students to use. If you have only one column then you get the page behaviour you need, and if you have more than one column then you don't get a column break in the middle.

Note that you should not do:


... because that sets the property at the line level as well.

I hope this helps.

. . . . . . . . . . Ken

p.s. for readers: one seat remains open for Monday's XSLT/XQuery class in DC ... more room available for the XSL-FO class starting on the 9th:

Upcoming:  hands-on XSLT, XQuery and XSL-FO Washington DC Nov 2009
Interested in other classes?
Crane Softwrights Ltd.
Training tools: Comprehensive interactive XSLT/XPath 1.0/2.0 video
Video lesson:
Video overview:
G. Ken Holman                 mailto:gkholman@xxxxxxxxxxxxxxxxxxxx
Male Cancer Awareness Nov'07
Legal business disclaimers:

Current Thread