You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by Vincent Hennebert <vi...@anyware-tech.com> on 2008/02/21 17:14:49 UTC

keep-with-next on table-row

Hi Guys,

If anyone has any comment to make on this before I send another request 
for clarification to xsl-editors@...

fo:table-row does not generate any area, so the text in section 4.8, 
“Keeps and Breaks” doesn’t really apply to this element.
The question is: if keep-with-next is set on fo:table-row, shall we 
consider that this is equivalent to setting keep-with-next to the last 
child block of /every/ cell ending on this row, or that this is enough 
if at least one table-cell ending on this row is not trailing in the 
applicable reference area?

Illustration:
  <fo:table-row keep-with-next="always">
    <fo:table-cell>
      <fo:block>Cell 1.1 Line 1</fo:block>
      <fo:block>Cell 1.1 Line 2</fo:block>
      <fo:block>Cell 1.1 Line 3</fo:block>
    </fo:table-cell>
    <fo:table-cell>
      <fo:block>Cell 1.2 Line 1</fo:block>
      <fo:block>Cell 1.2 Line 2</fo:block>
    </fo:table-cell>
  </fo:table-row>
  <fo:table-row>
    <fo:table-cell>
      <fo:block>Cell 2.1 Line 1</fo:block>
      <fo:block>Cell 2.1 Line 2</fo:block>
    </fo:table-cell>
    <fo:table-cell>
      <fo:block>Cell 2.2 Line 1</fo:block>
      <fo:block>Cell 2.2 Line 2</fo:block>
    </fo:table-cell>
  </fo:table-row>

Is the following rendering correct:
  _____________________________________
  |                 |                 |
  | Cell 1.1 Line 1 | Cell 1.2 Line 1 |
  | Cell 1.1 Line 2 | Cell 1.2 Line 2 |

 --------------------------------------- Page break

  | Cell 1.1 Line 3 |                 |
  |_________________|_________________|
  |                 |                 |
  | Cell 2.1 Line 1 | Cell 2.2 Line 1 |
  | Cell 2.1 Line 2 | Cell 2.2 Line 2 |
  |_________________|_________________|


or can it only be like the following:
  _____________________________________
  |                 |                 |
  | Cell 1.1 Line 1 | Cell 1.2 Line 1 |

 --------------------------------------- Page break

  | Cell 1.1 Line 2 | Cell 1.2 Line 2 |
  | Cell 1.1 Line 3 |                 |
  |_________________|_________________|
  |                 |                 |
  | Cell 2.1 Line 1 | Cell 2.2 Line 1 |
  | Cell 2.1 Line 2 | Cell 2.2 Line 2 |
  |_________________|_________________|


Personally I’d go with the first possibility.

Thanks,
Vincent


--
Vincent Hennebert                            Anyware Technologies
http://people.apache.org/~vhennebert         http://www.anyware-tech.com
Apache FOP Committer                         FOP Development/Consulting

Re: keep-with-next on table-row

Posted by Vincent Hennebert <vi...@anyware-tech.com>.
Hi Jeremias,

Jeremias Maerki wrote:
> IMO, both possibilities in your example below would be correct. If the
> keep-with-next is set on the table-row, it applies to all table-cells of
> that row because table-row itself doesn't produce any areas. In both
> your examples the table-cell produces an area (potentially with no
> children, i.e. no text). The keep constraint doesn't have any effect on
> the contents of the table-cell. Do I make any sense?

Definitely, and that’s also how I interpret it. But since keeps don’t 
apply to table-cell, I was wondering if keep on table-row shouldn’t be 
passed over directly to the cells’ children. But as table-cell does 
generate areas, our interpretation may be valid. But then I’m wondering 
why you can’t specify keeps on table-cell.

And it may also be interesting to note that both XEP and XSL Formatter 
put some content from all the cells on the second page (second solution 
below).

So I think I’ll still send a request for clarification.

Thanks for your input,
Vincent


> On 21.02.2008 17:14:49 Vincent Hennebert wrote:
>> Hi Guys,
>>
>> If anyone has any comment to make on this before I send another request 
>> for clarification to xsl-editors@...
>>
>> fo:table-row does not generate any area, so the text in section 4.8, 
>> “Keeps and Breaks” doesn’t really apply to this element.
>> The question is: if keep-with-next is set on fo:table-row, shall we 
>> consider that this is equivalent to setting keep-with-next to the last 
>> child block of /every/ cell ending on this row, or that this is enough 
>> if at least one table-cell ending on this row is not trailing in the 
>> applicable reference area?
>>
>> Illustration:
>>   <fo:table-row keep-with-next="always">
>>     <fo:table-cell>
>>       <fo:block>Cell 1.1 Line 1</fo:block>
>>       <fo:block>Cell 1.1 Line 2</fo:block>
>>       <fo:block>Cell 1.1 Line 3</fo:block>
>>     </fo:table-cell>
>>     <fo:table-cell>
>>       <fo:block>Cell 1.2 Line 1</fo:block>
>>       <fo:block>Cell 1.2 Line 2</fo:block>
>>     </fo:table-cell>
>>   </fo:table-row>
>>   <fo:table-row>
>>     <fo:table-cell>
>>       <fo:block>Cell 2.1 Line 1</fo:block>
>>       <fo:block>Cell 2.1 Line 2</fo:block>
>>     </fo:table-cell>
>>     <fo:table-cell>
>>       <fo:block>Cell 2.2 Line 1</fo:block>
>>       <fo:block>Cell 2.2 Line 2</fo:block>
>>     </fo:table-cell>
>>   </fo:table-row>
>>
>> Is the following rendering correct:
>>   _____________________________________
>>   |                 |                 |
>>   | Cell 1.1 Line 1 | Cell 1.2 Line 1 |
>>   | Cell 1.1 Line 2 | Cell 1.2 Line 2 |
>>
>>  --------------------------------------- Page break
>>
>>   | Cell 1.1 Line 3 |                 |
>>   |_________________|_________________|
>>   |                 |                 |
>>   | Cell 2.1 Line 1 | Cell 2.2 Line 1 |
>>   | Cell 2.1 Line 2 | Cell 2.2 Line 2 |
>>   |_________________|_________________|
>>
>>
>> or can it only be like the following:
>>   _____________________________________
>>   |                 |                 |
>>   | Cell 1.1 Line 1 | Cell 1.2 Line 1 |
>>
>>  --------------------------------------- Page break
>>
>>   | Cell 1.1 Line 2 | Cell 1.2 Line 2 |
>>   | Cell 1.1 Line 3 |                 |
>>   |_________________|_________________|
>>   |                 |                 |
>>   | Cell 2.1 Line 1 | Cell 2.2 Line 1 |
>>   | Cell 2.1 Line 2 | Cell 2.2 Line 2 |
>>   |_________________|_________________|
>>
>>
>> Personally I’d go with the first possibility.
> 
> Jeremias Maerki


-- 
Vincent Hennebert                            Anyware Technologies
http://people.apache.org/~vhennebert         http://www.anyware-tech.com
Apache FOP Committer                         FOP Development/Consulting

Re: keep-with-next on table-row

Posted by Jeremias Maerki <de...@jeremias-maerki.ch>.
IMO, both possibilities in your example below would be correct. If the
keep-with-next is set on the table-row, it applies to all table-cells of
that row because table-row itself doesn't produce any areas. In both
your examples the table-cell produces an area (potentially with no
children, i.e. no text). The keep constraint doesn't have any effect on
the contents of the table-cell. Do I make any sense? I don't think a
clarification is necessary here.

On 21.02.2008 17:14:49 Vincent Hennebert wrote:
> Hi Guys,
> 
> If anyone has any comment to make on this before I send another request 
> for clarification to xsl-editors@...
> 
> fo:table-row does not generate any area, so the text in section 4.8, 
> “Keeps and Breaks” doesn’t really apply to this element.
> The question is: if keep-with-next is set on fo:table-row, shall we 
> consider that this is equivalent to setting keep-with-next to the last 
> child block of /every/ cell ending on this row, or that this is enough 
> if at least one table-cell ending on this row is not trailing in the 
> applicable reference area?
> 
> Illustration:
>   <fo:table-row keep-with-next="always">
>     <fo:table-cell>
>       <fo:block>Cell 1.1 Line 1</fo:block>
>       <fo:block>Cell 1.1 Line 2</fo:block>
>       <fo:block>Cell 1.1 Line 3</fo:block>
>     </fo:table-cell>
>     <fo:table-cell>
>       <fo:block>Cell 1.2 Line 1</fo:block>
>       <fo:block>Cell 1.2 Line 2</fo:block>
>     </fo:table-cell>
>   </fo:table-row>
>   <fo:table-row>
>     <fo:table-cell>
>       <fo:block>Cell 2.1 Line 1</fo:block>
>       <fo:block>Cell 2.1 Line 2</fo:block>
>     </fo:table-cell>
>     <fo:table-cell>
>       <fo:block>Cell 2.2 Line 1</fo:block>
>       <fo:block>Cell 2.2 Line 2</fo:block>
>     </fo:table-cell>
>   </fo:table-row>
> 
> Is the following rendering correct:
>   _____________________________________
>   |                 |                 |
>   | Cell 1.1 Line 1 | Cell 1.2 Line 1 |
>   | Cell 1.1 Line 2 | Cell 1.2 Line 2 |
> 
>  --------------------------------------- Page break
> 
>   | Cell 1.1 Line 3 |                 |
>   |_________________|_________________|
>   |                 |                 |
>   | Cell 2.1 Line 1 | Cell 2.2 Line 1 |
>   | Cell 2.1 Line 2 | Cell 2.2 Line 2 |
>   |_________________|_________________|
> 
> 
> or can it only be like the following:
>   _____________________________________
>   |                 |                 |
>   | Cell 1.1 Line 1 | Cell 1.2 Line 1 |
> 
>  --------------------------------------- Page break
> 
>   | Cell 1.1 Line 2 | Cell 1.2 Line 2 |
>   | Cell 1.1 Line 3 |                 |
>   |_________________|_________________|
>   |                 |                 |
>   | Cell 2.1 Line 1 | Cell 2.2 Line 1 |
>   | Cell 2.1 Line 2 | Cell 2.2 Line 2 |
>   |_________________|_________________|
> 
> 
> Personally I’d go with the first possibility.
> 
> Thanks,
> Vincent
> 
> 
> --
> Vincent Hennebert                            Anyware Technologies
> http://people.apache.org/~vhennebert         http://www.anyware-tech.com
> Apache FOP Committer                         FOP Development/Consulting




Jeremias Maerki