W3C home > Mailing lists > Public > www-xsl-fo@w3.org > September 2007

Same height rows in table

From: Winterflood, Jonathan <jonathan.winterflood@capgemini.com>
Date: Mon, 10 Sep 2007 17:26:54 +0200
Message-ID: <9FD178D09DF6AC43B2FF313CFB0D11ED299B64@CORPMAIL33.corp.capgemini.com>
To: <www-xsl-fo@w3.org>


I'm trying to tell xsl-fo to keep all rows in a table the same height:

The table contains 2 columns, and 2(n) rows.
The second column spans all rows and contains a 'large' graphic and
makes the table expand beyond the height required by the first column
In this case, the last row in the first column grows so the bottom edge
matches that of the second column (like a table, fancy that!) and is
therefore taller than the other rows.

I would like all the rows to keep the same height, i.e. expand together
to match the height of the second column.

Current:    Wanted:
+---+---+   +---+---+
|   |   |   |   |   |
+---+   |   |   |   |
|   |   |   |   |   |
|   |   |   +---+   |
|   |   |   |   |   |
|   |   |   |   |   |
|   |   |   |   |   |
+---+---+   +---+---+

Is this possible without hard-coding the height of the lines? (I would
rather not calculate the size of the content of the second column...)

I have tried setting the table-row heights to 50% (100/n%), to no avail.

Just in case it matters, I'm using Apache FOP for the rendering.

Here is a (hopefully) minimal example:

<?xml version="1.0" encoding="iso-8859-1"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/1999/XSL/Format" version="1.0">
 <xsl:template match="/">
<fo:root xmlns:fo="http://www.w3.org/1999/XSL/Format">
  <fo:simple-page-master master-name="test">
 <fo:page-sequence master-reference="test">
  <fo:flow flow-name="xsl-region-body">
<fo:table width="100%" table-layout="fixed">
 <fo:table-column column-width="80%"/>
 <fo:table-column column-width="20%"/>
   <fo:table-cell border-style="solid">
   <fo:table-cell number-rows-spanned="2" border-style="solid">
   <fo:table-cell border-style="solid">


Jonathan Winterflood

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.
Received on Monday, 10 September 2007 21:47:37 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 23:10:07 UTC