Re: [xsl] balanced columns?

Subject: Re: [xsl] balanced columns?
From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx>
Date: Thu, 15 Sep 2005 22:39:03 -0400
At 2005-09-15 17:18 -0700, Dan Vint wrote:
I did a search on balanced and unbalanced columns in the spec and didn't find anything. Also looked into widows and orphans with no help.

Is there a way in XSL to request a multi column layout to balance the length of columns when it doesn't fill a page?

:{)} This is part of the first exercise in my XSL-FO training, Dan ... too bad you haven't yet had the chance to take it.

Add a zero-sized spanned block at the end of your flow for the page sequence ... this will push up the columns into their span-reference-area in order to open the new span-reference-area for the empty block, thus accomplishing your required balancing. The empty block will not render and all you have is the balanced columns.

Note, though, the balancing isn't necessarily precise as the formatter still has to accommodate widows and orphans in the "pushed-up" column content. In my exercise's data it happens that the left column is three lines longer than the right in order to satisfy the widow/orphan counts. But, the lines are all at the top of the two-column page, not just down the left.

I hope this helps.

. . . . . . . . Ken

-- World-wide on-site corporate, govt. & user group XML/XSL training. G. Ken Holman mailto:gkholman@xxxxxxxxxxxxxxxxxxxx Crane Softwrights Ltd. Box 266, Kars, Ontario CANADA K0A-2E0 +1(613)489-0999 (F:-0995) Male Cancer Awareness Aug'05 Legal business disclaimers:

Current Thread