You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by "Puppala, Kumar (LNG-CON)" <ku...@lexisnexis.com> on 2008/02/04 17:11:41 UTC

fo:table-row issues

I am trying to render a 2x2 table, the first row of which spans across
two cells and two rows as shown below:

 

<fo:table table-layout="fixed" width="100%">

<fo:table-column column-number="1" column-width="1.250000in"/>

<fo:table-column column-number="2" column-width="1.250000in"/>

<fo:table-body>

<fo:table-row>

<fo:table-cell border-style="solid" border-width="0.2mm" padding="2pt"
text-align="left" display-align="before" number-columns-spanned="2"
number-rows-spanned="2" >

<fo:block>

<fo:inline font-family="Times" color="#000000" font-weight="normal"
font-style="normal" text-decoration="no-underline" font-size="10pt"
>kangaroo

</fo:inline>

</fo:block>

</fo:table-cell>

</fo:table-row>

<fo:table-row></fo:table-row>

</fo:table-body>

</fo:table>

 

 

This markup used to produce the desired results in fop 0.20.5 but gives
me validation errors when using 0.94 and higher (trunk included). If I
try to adhere to the validation rules and provide a table-cell with an
empty block for the second row, it complains that the number of cells
overflow the number specified for the table.

 

>From this analysis, it looks like if a table contains a row which spans
the entire columns and any additional rows, we run into issues. Has
anyone encountered this issue and are there any workarounds for this?

 

 

Thanks,

Kumar Puppala


RE: fo:table-row issues

Posted by "Puppala, Kumar (LNG-CON)" <ku...@lexisnexis.com>.
Andreas,
  You are correct in you analysis that having such data does not make
much sense. But since we are a downstream system and we don't control
the data that comes to us (in XML format), we do implicit conversions to
XSL-FO format using our own programs. As such, we need to account for
all such weird situations :)

Thanks !!

-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be] 
Sent: Monday, February 04, 2008 12:41 PM
To: fop-users@xmlgraphics.apache.org
Subject: Re: fo:table-row issues

On Feb 4, 2008, at 18:03, Puppala, Kumar (LNG-CON) wrote:

Hi
>
> Thanks for the quick reply. I tried both the suggestions and am  
> still having issues. Listed below are my findings:
>
> What if you add two empty cells, or simply leave out the empty row?
>
> If I add two empty cells, the renderer complains that the number of  
> cells in the row overflows. The error message is as shown below:
>
> "org.apache.fop.fo.ValidationException: Error(67/15): column-number  
> or number of cells in the row overflows the number of fo:table- 
> column specified for the table."
>
OK. This still seems understandable to me, although it does not help  
your case, but...
> If I leave out the entire row, I see different results between fop  
> 0.94 and fopTrunk. In fop 0.94, it renders but the borders on the  
> top for the two cells are missing (attaching the pdf doc). However,  
> in fopTrunk, I get the following validation exception:
>
>  "org.apache.fop.fo.ValidationException: A table-cell is spanning  
> more rows than available in its parent element."
>

This seems to be a bit too strong to me. I'd prefer a warning and a  
fallback to the number of available rows, instead of throwing a  
ValidationException in this case... Maybe I'm missing some parts of  
the XSL-FO Rec, but it does not mention this explicitly as an error.

What do others think?

OTOH, now I'm wondering why you would create a table with only one  
row, and a cell in that row that spans two rows, or even: why you  
would in that case want to add another row, just so the cell can span  
two rows... It seems more correct to omit the number-rows-spanned  
property in that case, but of course, I have no idea if this is  
simple to achieve by altering your stylesheet.


Cheers

Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


Re: fo:table-row issues

Posted by Andreas Delmelle <an...@telenet.be>.
On Feb 4, 2008, at 18:03, Puppala, Kumar (LNG-CON) wrote:

Hi
>
> Thanks for the quick reply. I tried both the suggestions and am  
> still having issues. Listed below are my findings:
>
> What if you add two empty cells, or simply leave out the empty row?
>
> If I add two empty cells, the renderer complains that the number of  
> cells in the row overflows. The error message is as shown below:
>
> “org.apache.fop.fo.ValidationException: Error(67/15): column-number  
> or number of cells in the row overflows the number of fo:table- 
> column specified for the table.”
>
OK. This still seems understandable to me, although it does not help  
your case, but...
> If I leave out the entire row, I see different results between fop  
> 0.94 and fopTrunk. In fop 0.94, it renders but the borders on the  
> top for the two cells are missing (attaching the pdf doc). However,  
> in fopTrunk, I get the following validation exception:
>
>  “org.apache.fop.fo.ValidationException: A table-cell is spanning  
> more rows than available in its parent element.”
>

This seems to be a bit too strong to me. I'd prefer a warning and a  
fallback to the number of available rows, instead of throwing a  
ValidationException in this case... Maybe I'm missing some parts of  
the XSL-FO Rec, but it does not mention this explicitly as an error.

What do others think?

OTOH, now I'm wondering why you would create a table with only one  
row, and a cell in that row that spans two rows, or even: why you  
would in that case want to add another row, just so the cell can span  
two rows... It seems more correct to omit the number-rows-spanned  
property in that case, but of course, I have no idea if this is  
simple to achieve by altering your stylesheet.


Cheers

Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org


RE: fo:table-row issues

Posted by "Puppala, Kumar (LNG-CON)" <ku...@LexisNexis.com>.
Thanks for the quick reply. I tried both the suggestions and am still
having issues. Listed below are my findings:

 

What if you add two empty cells, or simply leave out the empty row?

If I add two empty cells, the renderer complains that the number of
cells in the row overflows. The error message is as shown below:

 

"org.apache.fop.fo.ValidationException: Error(67/15): column-number or
number of cells in the row overflows the number of fo:table-column
specified for the table."

 

If I leave out the entire row, I see different results between fop 0.94
and fopTrunk. In fop 0.94, it renders but the borders on the top for the
two cells are missing (attaching the pdf doc). However, in fopTrunk, I
get the following validation exception: 

 "org.apache.fop.fo.ValidationException: A table-cell is spanning more
rows than available in its parent element."

 

Thanks !!

 

-----Original Message-----
From: Andreas Delmelle [mailto:andreas.delmelle@telenet.be] 
Sent: Monday, February 04, 2008 11:27 AM
To: fop-users@xmlgraphics.apache.org
Subject: Re: fo:table-row issues

 

On Feb 4, 2008, at 17:11, Puppala, Kumar (LNG-CON) wrote:

 

Hi

 

> I am trying to render a 2x2 table, the first row of which spans  

> across two cells and two rows as shown below:

> 

> <fo:table table-layout="fixed" width="100%">

> <fo:table-column column-number="1" column-width="1.250000in"/>

> <fo:table-column column-number="2" column-width="1.250000in"/>

> <fo:table-body>

> <fo:table-row>

> <fo:table-cell border-style="solid" border-width="0.2mm"  

> padding="2pt" text-align="left" display-align="before" number- 

> columns-spanned="2" number-rows-spanned="2" >

> <fo:block>

> <fo:inline font-family="Times" color="#000000" font-weight="normal"  

> font-style="normal" text-decoration="no-underline" font-size="10pt"  

> >kangaroo

> </fo:inline>

> </fo:block>

> </fo:table-cell>

> </fo:table-row>

> <fo:table-row></fo:table-row>

> </fo:table-body>

> </fo:table>

> 

> 

> This markup used to produce the desired results in fop 0.20.5 but  

> gives me validation errors when using 0.94 and higher (trunk  

> included).

 

 

This (an empty row) is definitely not allowed by the XSL-FO Rec, so  

the validation error is more correct than 0.20.5, in any case.

The XSL content model of fo:table-row only allows for one or more  

fo:table-cell child nodes, possibly preceded by some fo:markers  

(although, IIC, FOP Trunk will ignore markers in a table-row).

 

> If I try to adhere to the validation rules and provide a table-cell  

> with an empty block for the second row, it complains that the  

> number of cells overflow the number specified for the table.

> 

> From this analysis, it looks like if a table contains a row which  

> spans the entire columns and any additional rows, we run into  

> issues. Has anyone encountered this issue and are there any  

> workarounds for this?

 

What if you add two empty cells, or simply leave out the empty row?

 

The last option would definitely be preferable, as it saves resources  

(no construction of empty cells/blocks). If you can adapt the  

stylesheet, so it omits the offending row, that should work...

 

 

HTH!

 

Andreas

 

---------------------------------------------------------------------

To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org

For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org

 


Re: fo:table-row issues

Posted by Andreas Delmelle <an...@telenet.be>.
On Feb 4, 2008, at 17:11, Puppala, Kumar (LNG-CON) wrote:

Hi

> I am trying to render a 2x2 table, the first row of which spans  
> across two cells and two rows as shown below:
>
> <fo:table table-layout="fixed" width="100%">
> <fo:table-column column-number="1" column-width="1.250000in"/>
> <fo:table-column column-number="2" column-width="1.250000in"/>
> <fo:table-body>
> <fo:table-row>
> <fo:table-cell border-style="solid" border-width="0.2mm"  
> padding="2pt" text-align="left" display-align="before" number- 
> columns-spanned="2" number-rows-spanned="2" >
> <fo:block>
> <fo:inline font-family="Times" color="#000000" font-weight="normal"  
> font-style="normal" text-decoration="no-underline" font-size="10pt"  
> >kangaroo
> </fo:inline>
> </fo:block>
> </fo:table-cell>
> </fo:table-row>
> <fo:table-row></fo:table-row>
> </fo:table-body>
> </fo:table>
>
>
> This markup used to produce the desired results in fop 0.20.5 but  
> gives me validation errors when using 0.94 and higher (trunk  
> included).


This (an empty row) is definitely not allowed by the XSL-FO Rec, so  
the validation error is more correct than 0.20.5, in any case.
The XSL content model of fo:table-row only allows for one or more  
fo:table-cell child nodes, possibly preceded by some fo:markers  
(although, IIC, FOP Trunk will ignore markers in a table-row).

> If I try to adhere to the validation rules and provide a table-cell  
> with an empty block for the second row, it complains that the  
> number of cells overflow the number specified for the table.
>
> From this analysis, it looks like if a table contains a row which  
> spans the entire columns and any additional rows, we run into  
> issues. Has anyone encountered this issue and are there any  
> workarounds for this?

What if you add two empty cells, or simply leave out the empty row?  
The last option would definitely be preferable, as it saves resources  
(no construction of empty cells/blocks). If you can adapt the  
stylesheet, so it omits the offending row, that should work...


HTH!

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-users-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-users-help@xmlgraphics.apache.org