[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Fwd: Re: [docbook-apps] height of rows in tables
>Date: Sat, 23 Sep 2006 11:14:40 -0500 >To: "Bob Stayton" <bobs@sagehill.net> >From: Ron Catterall <ron@catterall.net> >Subject: Re: [docbook-apps] height of rows in tables >Cc: >Bcc: > >>Ah, what you are running into is this bit of code in the template >>with match="entry": >> >> <xsl:variable name="empty.cell" select="count(node()) = 0"/> >> >> <xsl:when test="$empty.cell"> >> <xsl:text> </xsl:text> >> </xsl:when> >> >>This inserts a nonbreaking space in an empty cell. I don't know >>why, but it was probably to work around some XSL-FO processor bug >>(anyone remember?). >> >>Since the fo:block in the cell is not empty, it generates a line >>area, and the line area has the current line-height, as well as the >>2pt of cell padding above and below. I think the height property >>on a table row is the minimum height, but it won't be smaller than >>the content's height. >> >>To work around this problem for your tables, just put a comment >>inside each empty entry element in your divider rows. That will >>cause the non-breaking space to be omitted, and no line area to be >>generated. Then your row height should work. >> >>Bob Stayton > >Not quite as simple as that I'm afraid. I'm getting some strange >results (Oxygen 7.2, DocBook 4.4, Saxon 6.5.5, XEP4.7) - FO output >in attached file fo_XEP4.7_output.jpg. > >header row - default height = 0.60cm >row 1 - default row height = 0.60cm >row 2 - row height = 0.3cm, no comments in cells, span all cols. gives 0.90cm >row 3 - default row height = 0.60cm >row 4 - row height = -0.3cm, no comments in cells, span all cols. gives 0.30cm >row 5 - default row height = 0.60cm >row 6 - row height = 0.3cm, + comments in cells, span all cols. gives 0.45cm >row 7 - default row height = 0.45cm ********** >row 8 - row height = -0.3cm, + comments in cells, span all cols. gives 0.15cm >row 9 - default row height = 0.45cm ********** >row 10- row height = 0.3cm, no comments in cells, separate cells. gives 0.90cm >row 11- default row height = 0.60cm >row 12- row height = -0.3cm, no comments in cells, separate cells. >gives 0.30cm >row 13- default row height = 0.60cm >row 14- row height = 0.3cm, + comments in cells, separate cells. gives 0.90cm >row 15- default row height = 0.60cm >row 16- row height = -0.3cm, + comments in cells, separate cells. gives 0.30cm >row 17- default row height = 0.60cm > >Looks like overlapping rows in rows 6,7,8,9 >But no overlapping in rows 14,15,16,17 > >Row heights are different but still strange for HTML (Firefox >1.5.0.7 which also does not support rowsep="0", colsep="0", or any >of the border style parameters. HTML output is not very important >for me, but would be nice. > >XML file follows > ><?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="Test_Rows" lang="EN" > ><title> >sect1 title ></title> ><table id="test_rows"><title> >table title ></title> ><tgroup cols="25" 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*"/> ><colspec colname="cl1" colwidth="1*"/> ><colspec colname="c12" colwidth="2*"/> ><colspec colname="c13" colwidth="2*"/> ><colspec colname="c14" colwidth="1*"/> ><colspec colname="c15" colwidth="2*"/> ><colspec colname="c16" colwidth="2*"/> ><colspec colname="c17" colwidth="1*"/> ><colspec colname="c18" colwidth="2*"/> ><colspec colname="c19" colwidth="2*"/> ><colspec colname="c20" colwidth="1*"/> ><colspec colname="c21" colwidth="2*"/> ><colspec colname="c22" colwidth="2*"/> ><colspec colname="c23" colwidth="1*"/> ><colspec colname="c24" colwidth="2*"/> ><colspec colname="c25" colwidth="2*"/> ><spanspec spanname="hspan" namest="c1" nameend="c25"/> ><spanspec spanname="hspan14" namest="cl" nameend="c4" /> ><spanspec spanname="hspan67" namest="c6" nameend="c7" /> ><spanspec spanname="hspan910" namest="c9" nameend="c10"/> ><spanspec spanname="hspan1213" namest="c12" nameend="c13"/> ><spanspec spanname="hspan1516" namest="c15" nameend="c16"/> ><spanspec spanname="hspan1819" namest="c18" nameend="c19"/> ><spanspec spanname="hspan2122" namest="c21" nameend="c22"/> ><spanspec spanname="hspan2425" namest="c24" nameend="c25"/> ><thead> ><row> ><entry spanname="hspan14">long header cols 1-4</entry> ><entry rowsep="0"></entry> ><entry spanname="hspan67">6-7</entry> ><entry rowsep="0"></entry> ><entry spanname="hspan910">9-10</entry> ><entry rowsep="0"></entry> ><entry spanname="hspan1213">12-13</entry> ><entry rowsep="0"></entry> ><entry spanname="hspan1516">15-16</entry> ><entry rowsep="0"></entry> ><entry spanname="hspan1819">18-19</entry> ><entry rowsep="0"></entry> ><entry spanname="hspan2122">21-22</entry> ><entry rowsep="0"></entry> ><entry spanname="hspan2425">24-25</entry> ></row> ></thead> ><tbody> ><row><entry spanname="hspan" colsep="0">default</entry></row> ><row><?dbhtml row-height="8"?><?dbfo row-height="0.3cm"?><entry >spanname="hspan" colsep="0"></entry></row> ><row><entry spanname="hspan" colsep="0">default</entry></row> ><row><?dbhtml row-height="8"?><?dbfo row-height="-0.3cm"?><entry >spanname="hspan" colsep="0"></entry></row> ><row><entry spanname="hspan" colsep="0">default</entry></row> ><row><?dbhtml row-height="8"?><?dbfo row-height="0.3cm"?><entry >spanname="hspan" colsep="0"><!-- --></entry></row> ><row><entry spanname="hspan" colsep="0">default</entry></row> ><row><?dbhtml row-height="8"?><?dbfo row-height="-0.3cm"?><entry >spanname="hspan" colsep="0"><!-- --></entry></row> ><row><entry spanname="hspan" colsep="0">default</entry></row> ><row><?dbhtml row-height="8"?><?dbfo row-height="0.3cm"?><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><entry >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><entry 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><entry >colsep="0"></entry></row> ><row><entry spanname="hspan" colsep="0">default</entry></row> ><row><?dbhtml row-height="8"?><?dbfo row-height="-0.3cm"?><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><entry >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><entry 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><entry >colsep="0"></entry></row> ><row><entry spanname="hspan" colsep="0">default</entry></row> ><row><?dbhtml row-height="8"?><?dbfo row-height="0.3cm"?><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><entry 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><entry 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><entry colsep="0"><!-- >--></entry></row> ><row><entry spanname="hspan" colsep="0">default</entry></row> ><row><?dbhtml row-height="8"?><?dbfo row-height="-0.3cm"?><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><entry 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><entry 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><entry colsep="0"><!-- >--></entry></row> ><row><entry spanname="hspan" colsep="0">default</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 -- 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]