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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

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

Mario Madunic
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. 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?

<table....
<fo:table-header>
<fo:table-row keep-with-next.within-column="2">
...
</fo:table-header>
<fo:table-body... />
</fo:table>

Marijan (Mario) Madunic
Publishing Specialist
New Flyer Industries
[hidden email]



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.
Reply | Threaded
Open this post in threaded view
|

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

G. Ken Holman
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">
     <stuff-2>
     </stuff-2>
     <object-3 keep-*="3">
       <stuff-3>
       </stuff-3>
     </object-3>
     <stuff-2>
     </stuff-2>
     <object-1 keep-*="1">
        <stuff-1>
        </stuff-1>
     </object-1>
     <stuff-2>
     </stuff-2>
   </object-2>

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?

Nope.

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:[hidden email]
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


Reply | Threaded
Open this post in threaded view
|

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

Mario Madunic
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
[hidden email]

-----Original Message-----
From: [hidden email] [mailto:[hidden email]] On Behalf Of G. Ken Holman
Sent: Tuesday, May 31, 2011 9:38 AM
To: [hidden email]
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">
     <stuff-2>
     </stuff-2>
     <object-3 keep-*="3">
       <stuff-3>
       </stuff-3>
     </object-3>
     <stuff-2>
     </stuff-2>
     <object-1 keep-*="1">
        <stuff-1>
        </stuff-1>
     </object-1>
     <stuff-2>
     </stuff-2>
   </object-2>

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?

Nope.

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:[hidden email]
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.
Reply | Threaded
Open this post in threaded view
|

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

G. Ken Holman
At 2011-05-31 10:03 -0500, Mario Madunic wrote:
>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?

I have not made the time to review the XSL-FO 2.0 specifications to
know if anything is on offer to help you.

Perhaps someone else on the list is more familiar with what is coming.

. . . . . . . . . . Ken

--
Contact us for world-wide XML consulting & instructor-led training
Crane Softwrights Ltd.          http://www.CraneSoftwrights.com/f/
G. Ken Holman                 mailto:[hidden email]
Legal business disclaimers:  http://www.CraneSoftwrights.com/legal


Reply | Threaded
Open this post in threaded view
|

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

Tony Graham-4
On Tue, May 31, 2011 4:07 pm, G. Ken Holman wrote:
> At 2011-05-31 10:03 -0500, Mario Madunic wrote:
>>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?
>
> I have not made the time to review the XSL-FO 2.0 specifications to
> know if anything is on offer to help you.
>
> Perhaps someone else on the list is more familiar with what is coming.

The XSL FO 2.0 requirements to do with tables are at
http://www.w3.org/TR/xslfo20-req/#N66215

There's nothing there about keeping a minimum number of rows before a break.

As Ken said, 'keep' numbers are just strength values.  They don't change
meaning just for tables, which I at least would find confusing if they
did.

Doesn't 'keep-with-next.within-column="always"' on both the head row and
the first body row keep the head and the first two rows in the same
column?  What does happen?

Regards,


Tony Graham                                   [hidden email]
Consultant                                 http://www.mentea.net
Mentea       13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
 --  --  --  --  --  --  --  --  --  --  --  --  --  --  --  --
    XML, XSL FO and XSLT consulting, training and programming