W3C home > Mailing lists > Public > www-xsl-fo@w3.org > May 2011

RE: Need better understanding of keep-with-next.within-column

From: Mario Madunic <Mario_Madunic@newflyer.com>
Date: Tue, 31 May 2011 10:03:37 -0500
To: "G. Ken Holman" <gkholman@CraneSoftwrights.com>, "www-xsl-fo@w3.org" <www-xsl-fo@w3.org>
Message-ID: <246DE0E0EA0D6942B54267334267212292CF09@NFIL050.newflyer.com>
Thanks Ken it makes better sense. The integer value does work differently than using 'always'.  On the off chance do you know if a more precise method is on the table when it comes keeping with next?

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries

-----Original Message-----
From: www-xsl-fo-request@w3.org [mailto:www-xsl-fo-request@w3.org] On Behalf Of G. Ken Holman
Sent: Tuesday, May 31, 2011 9:38 AM
To: www-xsl-fo@w3.org
Subject: Re: Need better understanding of keep-with-next.within-column

At 2011-05-31 08:31 -0500, Mario Madunic wrote:
>I'm trying to get a better understanding of
>keep-with-next.within-column when it pertains to a table header and
>the minimum number of rows following it before pushing it to the
>next column. What is confusing me is the term strength when it comes
>to using an integer value for keep-with-next.within-column.

Such values are sole for comparison to other such values.  The values
have no relationship to formatting objects per se.

When there are no other formatting objects using keep strength in
play, then the integer value of the keep strength is irrelevant.

Consider, however, when there are three keep strengths in play:

   <object-2 keep-*="2">
     <object-3 keep-*="3">
     <object-1 keep-*="1">

So ... whatever <object-2> is, say it doesn't fit in the existing
context.  It then moves to the next context.  But what if it doesn't
then fit in the second context?  So it "breaks".  It is breaking at a
keep-strength of "2", which means any descendent constructs at a
strength of "2" or less also break.  Which means that the processor
doesn't even bother checking if <object-1> fits or not, because it is
already considered broken.  However, <object-3> has a higher
keep-strength, so it is still in play.    Thus, the formatter will
continue to make sure <object-3> fits in context.  It may or may not
break, but if it doesn't fit, it will attempt to keep it together in
the next context.

Personally, I've only ever used keep-strength for the keep-together
property and not for the keep-with-next or keep-with-previous.  I
should think the same principles apply for all.

In my experience, I've only seen the Antenna House formatter support
numeric keep strength values.  None of the other formatters I use
recognize relative strength ... though the ones I've used have all
supported "always" or mapped any number value to "always".

>I'd like to push the table header to the next column if there are
>only 2 or less following table rows. And reading the spec it seems
>if I use an integer value it is defined as strength and not a number
>of rows or am I reading the spec wrong. Can I define a number of rows?


But I don't think you can get what you want with XSL-FO.  Keeps will
help you prevent the first row of a multy-row table from being
orphaned on the page by using a keep-with-next="always" (thus
dragging it to the next page if the second row must be put on the second page).

But not the other way around.  You can't "push" a table to the next
column if it has two rows or fewer.  Those rows fit on the current
column, so you'll get them on the current column.

I hope this helps your understanding of the way things work.

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

Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/

G. Ken Holman                 mailto:gkholman@CraneSoftwrights.com
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal

Please consider the environment before printing this e-mail.

CONFIDENTIALITY STATEMENT: This communication (and any and all information or material transmitted with this communication) is confidential, may be privileged and is intended only for the use of the intended recipient. If you are not the intended recipient, any review, retransmission, circulation, distribution, reproduction, conversion to hard copy, copying or other use of this communication, information or material is strictly prohibited and may be illegal. If you received this communication in error or if it is forwarded to you without the express authorization of New Flyer, please notify us immediately by telephone or by return email and permanently delete the communication, information and material from any computer, disk drive, diskette or other storage device or media. Thank you.
Received on Tuesday, 31 May 2011 15:04:41 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:58:34 UTC