Hi,

Here is my test code for 2 rows, 50%, 25cm:

<fo:root text-align="center" xmlns:fo="http://www.w3.org/1999/XSL/Format";>
 <fo:layout-master-set>
  <fo:simple-page-master master-name="A4_1" margin="1cm" page-width="21cm" 
page-height="29.7cm">
   <fo:region-body/>
  </fo:simple-page-master>
 </fo:layout-master-set>
 <fo:page-sequence master-reference="A4_1">
  <fo:flow flow-name="xsl-region-body">
   <fo:block-container block-progression-dimension="25cm">
    <fo:table table-layout="fixed" width="100%">
     <fo:table-body>
      <fo:table-row height="50%" border="solid">
       <fo:table-cell>
        <fo:block>test1</fo:block>
       </fo:table-cell>
      </fo:table-row>
      <fo:table-row height="50%" border="solid">
       <fo:table-cell>
        <fo:block>test2</fo:block>
       </fo:table-cell></fo:table-row></fo:table-body></fo:table>
</fo:block-container></fo:flow></fo:page-sequence>
</fo:root>

FOP complains about this (many times):

18 sept. 2007 09:54:37 org.apache.fop.layoutmgr.AbstractBaseLayoutManager 
getBaseLength
GRAVE: Cannot find LM to handle given FO for LengthBase. (fo:table-row, 
location: 13/49)

I understand why the percentages are vaguely defined in CSS, hence the 
block-progression 'workaround' in XEP
I imagine FOP simply does not define what to do with percentages, though.

I have worked around the problem for now by setting the individual heights.

Indeed, absolute-positioning of block-containers with some xpath magic could be 
an alternative as there are only a few rows/columns. 


Thanks for your help,
Jonathan

-----Message d'origine-----
De : Andreas L Delmelle [mailto:[EMAIL PROTECTED] 
Envoyé : samedi 15 septembre 2007 15:02
À : fop-users@xmlgraphics.apache.org
Objet : Re: Full-page table, %-height rows, and block-progression-dimension

On Sep 12, 2007, at 10:22, Winterflood, Jonathan wrote:

Hi

> Hi list,
>
> I'm trying to find a way to set the height of a table, and set the
> row-height to a percentage of that, but I can't seem to get it to
> work...
>

I think I understand the issue, but to make sure:
Could you perhaps post a small fragment that reflects what you have  
tried (don't need the whole table; if you can just draft the FO-code  
for the block-container, the table and its first row, that would be  
enough)?

I seem to remember that percentages in tables (for row-height and  
column-width) currently don't work at all. CSS and XSL-FO remain  
quite vague in their definition of how percentages should be  
interpreted here. CSS even states explicitly that the behavior of  
percentages in tables remains undefined (most likely because it leads  
to all sorts of vicious circles in HTML --read: non-paginated  
layout-- where the 33% would be roughly a third of the containing  
HTML-page's height, which *includes* the row on which the percentage  
is specified).

Depending on the complexity of the table in question, you may want to  
consider switching to block-containers entirely (instead of a table,  
use absolute-positioned block-containers that correspond to what are  
the cells in your current situation).
Mind that this would not be feasible for a 20-column x 100-row  
layout, but if the numbers are 2-column x 3-rows, then using a table  
could prove to be overkill.


Cheers

Andreas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


This message contains information that may be privileged or confidential and is 
the property of the Capgemini Group. It is intended only for the person to whom 
it is addressed. If you are not the intended recipient,  you are not authorized 
to read, print, retain, copy, disseminate,  distribute, or use this message or 
any part thereof. If you receive this  message in error, please notify the 
sender immediately and delete all  copies of this message.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to