[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] height of rows in tables
>Hi Ron,
>There is a dbhtml processing instruction for row-height, but not one
>for dbfo. 8^(
>It seems like a good idea if it is available for HTML output.
>
>If you want to customize it yourself, compare the match="row"
>template in table.xsl for both html and fo, and adapt the dbhtml
>row-height code for a dbfo row-height processing instruction. You
>want to add a "height" property to the fo:table-row output, and it
>needs to have units.
>
>Bob Stayton
Hi Bob
Many thanks. I've tried to implement the FO version (dbfo) but I'm
doing something wrong. Here is my version from my customization:
<xsl:template match="row">
<xsl:param name="spans"/>
<xsl:variable name="row-height">
<xsl:if test="processing-instruction('dbfo')">
<xsl:call-template name="dbfo-attribute">
<xsl:with-param name="pis" select="processing-instruction('dbfo')"/>
<xsl:with-param name="attribute" select="'row-height'"/>
</xsl:call-template>
</xsl:if>
</xsl:variable>
<xsl:variable name="bgcolor">
etc. etc. no change
</xsl:template>
I suspect I don't understand 'You want to add a "height" property to
the fo:table-row output, and it needs to have units'
Also, on testing the HTML version I find that there is a minimum row
height of about 20 pixels, even with an empty row. Some code below
to demonstrate with 50, 30 and 10 px row heights. I'm trying to
narrow up my empty separator rows to less than 20 px.
Ron
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE sect1 PUBLIC "-//OASIS//DTD DocBook XML V4.4//EN"
"http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
<sect1 id="table" lang="EN" >
<title>
sect1 title
</title>
<table id="tab_ana"><title>table title</title>
<tgroup cols="10" align="center" colsep="1" rowsep="1" >
<colspec colname="cl" colwidth="4.5*" align="left"/>
<colspec colname="c2" colwidth="5*" align="left"/>
<colspec colname="c3" colwidth="2*"/>
<colspec colname="c4" colwidth="2*"/>
<colspec colname="c5" colwidth="1*"/>
<colspec colname="c6" colwidth="2*"/>
<colspec colname="c7" colwidth="2*"/>
<colspec colname="c8" colwidth="1*"/>
<colspec colname="c9" colwidth="2*"/>
<colspec colname="c10" colwidth="2*"/>
<spanspec spanname="hspan" namest="c1" nameend="c10"/>
<spanspec spanname="hspan14" namest="c1" nameend="c4"/>
<spanspec spanname="hspan67" namest="c6" nameend="c7"/>
<spanspec spanname="hspan910" namest="c9" nameend="c10"/>
<thead>
<row>
<entry spanname="hspan14">4 col head</entry>
<entry rowsep="0"></entry>
<entry spanname="hspan67">[1]</entry>
<entry rowsep="0"></entry>
<entry spanname="hspan910">[2]</entry>
</row>
</thead>
<tfoot>
<row><entry spanname="hspan" >left justified footer text</entry></row>
</tfoot>
<tbody>
<!-- 50 px (HTML)/1.5cm (FO) EMPTY ROW -->
<row><?dbhtml row-height="40"?><?dbfo row-height="1.5cm"?><entry
spanname="hspan14" colsep="0"></entry><entry rowsep="0"
colsep="0"></entry><entry colsep="0"></entry><entry
colsep="0"></entry><entry rowsep="0" colsep="0"></entry><entry
colsep="0"></entry><entry colsep="0"></entry></row>
<!-- FILL 2 ROWS, NORMAL HEIGHT -->
<row>
<entry>Book 1</entry><entry>text
P</entry><entry>A</entry><entry>B</entry><entry
rowsep="0"></entry><entry></entry><entry>B</entry><entry
rowsep="0"></entry><entry></entry><entry></entry>
</row>
<row>
<entry>line 123</entry><entry>text
Q</entry><entry>C</entry><entry>D</entry><entry
rowsep="0"></entry><entry></entry><entry></entry><entry
rowsep="0"></entry><entry></entry><entry>D</entry>
</row>
<!-- 30 px (HTML)/1cm (FO) EMPTY ROW -->
<row><?dbhtml row-height="30"?><?dbfo row-height="1cm"?><entry
spanname="hspan14" colsep="0"></entry><entry rowsep="0"
colsep="0"></entry><entry colsep="0"></entry><entry
colsep="0"></entry><entry rowsep="0" colsep="0"></entry><entry
colsep="0"></entry><entry colsep="0"></entry></row>
<!-- FILL 2 ROWS, NORMAL HEIGHT -->
<row>
<entry>Book 2</entry><entry>text
R</entry><entry>A</entry><entry>B</entry><entry
rowsep="0"></entry><entry>A</entry><entry></entry><entry
rowsep="0"></entry><entry></entry><entry></entry>
</row>
<row>
<entry>line 234</entry><entry>text
S</entry><entry>C</entry><entry>D</entry><entry
rowsep="0"></entry><entry></entry><entry></entry><entry
rowsep="0"></entry><entry>C</entry><entry></entry>
</row>
<!-- 10 px (HTML)/2mm (FO) EMPTY ROW -->
<row><?dbhtml row-height="10"?><?dbfo row-height="2mm"?><entry
spanname="hspan14" colsep="0"></entry><entry
colsep="0"></entry><entry colsep="0"></entry><entry
colsep="0"></entry><entry colsep="0"></entry><entry
colsep="0"></entry><entry colsep="0"></entry></row>
</tbody>
</tgroup>
</table>
</sect1>
--
Ron Catterall, Phd, DSc email: ron@catterall.net
Prolongacion de Hidalgo 140 http://catterall.net/
San Felipe del Agua tel: +52 951 520 1821
Oaxaca 68020 Mexico fax: +1 530 348 8309
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]