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

Re: Same height rows in table

From: Tony Graham <Tony.Graham@MenteithConsulting.com>
Date: Thu, 13 Sep 2007 12:48:22 +0100
To: www-xsl-fo@w3.org
Message-ID: <873axig515.fsf@zako.menteithconsulting.com>

On Wed, Sep 12 2007 16:25:20 +0100, jonathan.winterflood@capgemini.com wrote:
> It seems to me as though this is fully legitimate xsl-fo code. Am I
> right or is it kind of a hack?

It is, as you put it, legitimate XSL markup, but there's no standardised
behaviour for that markup.

The "height" property [1] does apply to fo:table-cell.  The XSL
modifications to the CSS2 definition of "height" includes:

   For a discussion of the "height" property in tables see:

However, the CSS2 table height algorithms section [2] explicitly leaves
unspecified the meaning of percentage values of "height" for tables,
rows, and cells.  The most relevant unspecification (if there was such a
word) is:

   CSS2 does not define what percentage values of 'height' refer to when
   specified for table cells.

The same section also includes:

   CSS2 does not specify how cells that span more than row affect row
   height calculations except that the sum of the row heights involved
   must be great enough to encompass the cell spanning the rows.

So, the markup and the XEP behaviour are allowed by the XSL spec, but it
is not required that every formatter behaves that same way.


Tony Graham.
Tony.Graham@MenteithConsulting.com   http://www.menteithconsulting.com

Menteith Consulting Ltd             Registered in Ireland - No. 428599
Registered Office: 13 Kelly's Bay Beach, Skerries, Co. Dublin, Ireland
Menteith Consulting -- Understanding how markup works

[1] http://www.w3.org/TR/xsl11/#height
[2] http://www.w3.org/TR/REC-CSS2/tables.html#height-layout

> -----Message d'origine-----
> De : Vladimir Rodimyuk [mailto:VladimirR@ukrinvent.com] 
> Envoyé : mardi 11 septembre 2007 15:11
> À : Winterflood, Jonathan; www-xsl-fo@w3.org
> Objet : RE: Same height rows in table
> Hi Jonathan
> There is a method that works for XEP formatter. The trick is to set block-progression-dimension to image height. See code below
>       <fo:table-row>
>        <fo:table-cell border-style="solid" height="50%">
>         <!-- Set height to 50% of available area  -->
>         <fo:block>A</fo:block>
>        </fo:table-cell>
>        <fo:table-cell number-rows-spanned="2" border-style="solid">
>         <fo:block>
>          <fo:instream-foreign-object height="100%" baseline-shift="-10%"
>           content-height="scale-to-fit" scaling="uniform" role="checked checkbox">
>           <svg:svg width="1.2in" height="2.7in" viewBox="0 0 100 300">
>            <svg:text font-family="Helvetica" font-size="50" text-anchor="start" x="2" y="100">SVG</svg:text>
>            <svg:text font-family="Helvetica" font-size="42" text-anchor="start" x="2" y="200"
>            >Image</svg:text>
>           </svg:svg>
>          </fo:instream-foreign-object>
>         </fo:block>
>        </fo:table-cell>
>       </fo:table-row>
>       <fo:table-row>
>        <fo:table-cell border-style="solid" height="100%">
>         <!-- The 50% of area is already allocated, so set height to the rest of it - 100% of available area  -->
>         <fo:block>C</fo:block>
>        </fo:table-cell>
>       </fo:table-row>
>      </fo:table-body>
>     </fo:table>
>    </fo:block-container>
Received on Thursday, 13 September 2007 11:48:46 UTC

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