docbook-apps

  • 1.  Re: [docbook-apps] height of rows in tables

    Posted 09-22-2006 15:18
    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
    Sagehill Enterprises
    DocBook Consulting
    bobs@sagehill.net





  • 2.  Re: [docbook-apps] height of rows in tables

    Posted 09-22-2006 19:05
    >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



    "http://www.oasis-open.org/docbook/xml/4.4/docbookx.dtd">
    <sect1 id="table" lang="EN" >


    <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"/>

    <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>


    <row><entry spanname="hspan" >left justified footer text</entry></row>



    <row><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>

    <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>

    <row><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>

    <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>

    <row><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>

    </tgroup>

    </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