docbook-apps

table width problem with docbook 4.12, dbxsl 1.72.0 and FOP 0.93

  • 1.  table width problem with docbook 4.12, dbxsl 1.72.0 and FOP 0.93

    Posted 04-20-2007 05:17
      |   view attached
    I'm having a problem with DocBook (CALS) tables
    not being formatted correctly by the combination
    of the xslt stylesheets and FOP. The versions
    are:

    Framemaker: 7.2
    DocBook: 4.12 (I know, but this is the DocBook
    application that ships with Frame 7.2,
    and don't get me started on that.)
    DocBook stylesheets: docbook-xsl-1.72.0
    FOP: 0.93
    Java: jre1.6.0
    Windows XP

    I set these parameters:

    <xsl:param name="default.table.width" select="'5in'"></xsl:param>
    <xsl:param name="tablecolumns.extension" select="'1'"></xsl:param>
    <xsl:param name="fop1.extensions" select="'1'"></xsl:param>

    <xsl:attribute-set name="table.properties">
    <xsl:attribute name="keep-together.within-column">auto</xsl:attribute>
    </xsl:attribute-set>



    The problem is that the outer ruling on some
    tables extends too far to the right, beyond the
    row rulings and contents. See the attached png
    file for an example.

    The only FOP errors I get are warnings about an
    unresolved id reference that I don't believe is
    related to this problem.

    I can edit the .fo file, add up the "column-width"
    attributes and give this sum as the the value of
    the "width" attribute (in place of "100%") on the
    "fo:table" element and then the table will format
    correctly, but this would make for some fairly
    gnarly post-processing.

    I think I saw someone describing a similar problem
    on one of the mailing lists, but the suggestions
    didn't seem applicable.

    I'm aware of this posting:
    http://sourceware.org/ml/docbook-apps/2001-q4/msg00517.html
    but adding PIs with an absolute table width on a
    per table basis isn't a viable solution here.

    Any suggestions would be appreciated.

    Thanks.

    The XML source for the test file is as follows:


    <chapter>

    <sect1>
    <para>aslkdjfal slasjk laskdj lskjdf lskjf</para>

    <tgroup cols="3" colsep="1" rowsep="1">
    <colspec colnum="1" colname="1" colwidth="1.507in"></colspec>
    <colspec colnum="2" colname="2" colwidth="2.482in"></colspec>
    <colspec colnum="3" colname="3" colwidth="1.011in"></colspec>

    <row rowsep="1">
    <entry colname="1">Foo and Bar</entry>
    <entry colname="2">Language or Function</entry>
    <entry colname="3">Command</entry>
    </row>


    <row rowsep="1">
    <entry colname="1">Apple</entry>
    <entry colname="2">aaaaaaaaaaaaa</entry>
    <entry colname="3">11111111</entry>
    </row>
    <row rowsep="1">
    <entry colname="1">Orange</entry>
    <entry colname="2">bbbbbbbbbbbbbbbb</entry>
    <entry colname="3">2222222222</entry>
    </row>
    <row rowsep="1" condition="nonpvf">
    <entry colname="1">Banana</entry>
    <entry colname="2">cccccccccc</entry>
    <entry colname="3">333333333</entry>
    </row>
    <row rowsep="1" condition="nonpvf">
    <entry colname="1">Plantain</entry>
    <entry colname="2">ddddddddddd</entry>
    <entry colname="3">4444</entry>
    </row>
    <row rowsep="1" condition="nonpvf">
    <entry colname=""></entry>
    "1">Acerola<indexterm><primary>Compilers</primary><secondary>PGC++</secondary></indexterm>
    <entry colname="2">eeeeeeeeeeeeeeeeeee </entry>
    <entry colname="3">55555555</entry>
    </row>
    <row rowsep="1">
    <entry colname="1">Watermelon</entry>
    <entry colname="2">fffffffffffffffffff</entry>
    <entry colname="3">66666666</entry>
    </row>
    <row rowsep="0">
    <entry colname=""></entry>
    "1">Kiwi<indexterm><primary>Tools</primary><secondary>PGPROF</secondary></indexterm>
    <entry colname="2">gggggggggggggggggg</entry>
    <entry colname="3">7777777</entry>
    </row>

    </tgroup>

    <para>sldkflskf</para>

    <tgroup cols="8" colsep="1" rowsep="1">
    <colspec colnum="1" colname="1" colwidth="1.413in"></colspec>
    <colspec colnum="2" colname="2" colwidth="0.719in"></colspec>
    <colspec colnum="3" colname="3" colwidth="0.541in"></colspec>
    <colspec colnum="4" colname="4" colwidth="0.531in"></colspec>
    <colspec colnum="5" colname="5" colwidth="0.562in"></colspec>
    <colspec colnum="6" colname="6" colwidth="0.561in"></colspec>
    <colspec colnum="7" colname="7" colwidth="0.561in"></colspec>
    <colspec colnum="8" colname="8" colwidth="1.171in"></colspec>

    <row rowsep="1">
    <entry colname="1">Peel</entry>
    <entry colname="2">2-bit</entry>
    <entry colname="3">4-bit</entry>
    <entry colname="4">8-bit</entry>
    <entry colname="5">16-bit</entry>
    <entry colname="6">32-bit</entry>
    <entry colname="7">64-bit</entry>
    <entry colname="8">United Fruitcake</entry>
    </row>


    <row rowsep="1">
    <entry colname="1">Zipper</entry>
    <entry colname="2"><para></para></entry>
    <entry colname="3"><para></para></entry>
    <entry colname="4"><para></para></entry>
    <entry colname="5"><para></para></entry>
    <entry colname="6"><para>X</para></entry>
    <entry colname="7"><para></para></entry>
    <entry colname="8"><para>X</para></entry>
    </row>
    <row rowsep="1">
    <entry colname="1">Velcro</entry>
    <entry colname="2"><para>X</para></entry>
    <entry colname="3"><para>X</para></entry>
    <entry colname="4"><para></para></entry>
    <entry colname="5"><para></para></entry>
    <entry colname="6"><para>X</para></entry>
    <entry colname="7"><para></para></entry>
    <entry colname="8">X</entry>
    </row>
    <row rowsep="1">
    <entry colname="1"><para>Lacing</para></entry>
    <entry colname="2"><para>X</para></entry>
    <entry colname="3"><para>X</para></entry>
    <entry colname="4"><para>X</para></entry>
    <entry colname="5"><para></para></entry>
    <entry colname="6"><para>X</para></entry>
    <entry colname="7"><para>X</para></entry>
    <entry colname="8">X</entry>
    </row>
    <row rowsep="0">
    <entry colname="1">Buttons</entry>
    <entry colname="2"><para>X</para></entry>
    <entry colname="3"><para>X</para></entry>
    <entry colname="4"><para>X</para></entry>
    <entry colname="5"><para></para></entry>
    <entry colname="6"><para>X</para></entry>
    <entry colname="7"><para>X</para></entry>
    <entry colname="8"><para>X</para></entry>
    </row>

    </tgroup>
    </sect1></chapter>