Re: SV: Re: [xsl] fo spaces

Subject: Re: SV: Re: [xsl] fo spaces
From: Abel Braaksma <>
Date: Thu, 15 Mar 2007 13:47:47 +0100
Mati Hadi wrote:
My xsl-fo is look like this:

<?xml version="1.0" encoding="utf-8"?>
<fo:root xmlns:fo="";>
I want to solve such problem when there is just one
line in the last block that it deasn't hold in the
current page and goes alone to the next page.(it is
not beautiful), so why not to take the minimum value
instead of optimum one.
what are space-before/after.minimum/maximum useful

You repeat your question. Please read my previous comments, it answers your question. The space-before/after are not meant for keeping widows and orphans. By default, two lines are kept together as widow/orphan. You can override this for any block-level element with the widow/orphan properties. The value is numeric and denotes the number of lines to keep. For more info I suggest you read up on chapter 9.2 "Widows and Orphans" of Ken Holman's book.

I tried your xsl-fo file, but it contained errors. After fixing them, it did not show what you seem to try to tell (i.e., nothing breaks on the page-end).

To test the widow/orphan, you can try the following xsl fo stylesheet. When processed, notice that, without widow/orphan control, two lines show on the next page (this is the default), but with widows="3", you will see three lines on the second page.

<fo:root xmlns:fo="";>
           master-name="test-page-master" page-width="2in"
           <fo:region-body margin="0.25in"/>
       <fo:flow flow-name="xsl-region-body">
           <fo:block widows="3">
               Neque porro quisquam est
               qui dolorem ipsum quia
               dolor sit amet, consectetur,
               adipisci velit...

-- Abel Braaksma

Current Thread