#73 Can't overwrite Table Width Parameters

closed-works-for-me
nobody
XSL (1066)
5
2004-11-20
2001-07-04
No

Overwriting the parameters default.table.width, and
nominal.table.width seems to be ignored by the style
sheet.
The resulting fo, are only generated with the relative
column width, as I defined using the docbook element

<colspec colwidth="24*" .../>
...

Discussion

  • Norman Walsh

    Norman Walsh - 2001-07-04

    Logged In: YES
    user_id=81663

    Please attach a document that demonstrates this problem.

     
  • Jens Stavnstrup

    Jens Stavnstrup - 2001-07-05

    Logged In: YES
    user_id=261049

    Norm,

    Enclosed an archive with two files, a docbook eksample with tables, and my stylesheet.

    The was tested with both Saxon 6.3 and 6.4. Considering your comments regarding Saxons problem with xsl:import and xsl:include, it was also tested with xalan 2.1.0, although all three produce different fo document, all fail to utilize the table-width parameteres in the style sheets.

    Jens

     
  • Jens Stavnstrup

    Jens Stavnstrup - 2001-07-05

    Logged In: YES
    user_id=261049

    The upload of the file seems to fail, I will try again.

     
  • Jens Stavnstrup

    Jens Stavnstrup - 2001-07-05

    Logged In: YES
    user_id=261049

    Annoying, the upload part fail, so here is the source:

    XML file
    ---------
    <?xml version="1.0" ?>

    <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
    "/home/js/src/xml/docbkx412/docbookx.dtd">

    <book>

    <chapter><title>This is chapter One</title>

    <para>This is an example of the problem with missing table width</para>

    <sect1><title>Title of section 1</title>

    Here is an example of one of the tables, I had problems with. In the
    next section, I include the same table, but this time embedded in the
    table tags.

    <informaltable frame="all">
    <tgroup cols="4">
    <colspec colwidth="17*"/>
    <colspec colwidth="23*"/>
    <colspec colwidth="21*"/>
    <colspec colwidth="39*"/>
    <thead>
    <row>
    <entry>H1</entry>
    <entry>H2</entry>
    <entry>H3</entry>
    <entry>H4</entry>
    </row>
    </thead>
    <tbody>
    <row>
    <entry>C11</entry>
    <entry>C12</entry>
    <entry>C13</entry>
    <entry>C14</entry>
    </row>
    <row>
    <entry>C21</entry>
    <entry>C22</entry>
    <entry>C23</entry>
    <entry>C24</entry>
    </row>
    </tbody>
    </tgroup>
    </informaltable>

    </sect1>

    <sect1><title>Title of Section 2</title>

    <table frame="all">
    <title>Network Standards</title>
    <tgroup cols="4">
    <colspec colwidth="17*"/>
    <colspec colwidth="23*"/>
    <colspec colwidth="21*"/>
    <colspec colwidth="39*"/>
    <thead>
    <row>
    <entry>H1</entry>
    <entry>H2</entry>
    <entry>H3</entry>
    <entry>H4</entry>
    </row>
    </thead>
    <tbody>
    <row>
    <entry>C11</entry>
    <entry>C12</entry>
    <entry>C13</entry>
    <entry>C14</entry>
    </row>
    <row>
    <entry>C21</entry>
    <entry>C22</entry>
    <entry>C23</entry>
    <entry>C24</entry>
    </row>
    </tbody>
    </tgroup>
    </table>

    </sect1>

    </chapter>

    </book>

    -----------------
    XSL file
    -----------------

    <?xml version='1.0'?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    version='1.0'
    xmlns="http://www.w3.org/TR/xhtml1/transitional"
    exclude-result-prefixes="#default">

    <xsl:import href="/home/js/lib/dbxsl/fo/docbook.xsl"/>

    <xsl:variable name="toc.section.depth">3</xsl:variable>

    <!-- Add other variable definitions here -->

    <xsl:param name="insert.xref.page.number" select="1"/>

    <!-- Comment to Norm

    The next two parameters confused me in the beginning, since you in the
    documentation of this parameter use the word chapters. I used these to
    unsuccesfully disable the generation of a table of figures, until I
    discovered the generate.book.* parameters.

    -->

    <xsl:param name="generate.division.figure.lot" select="0"/>
    <xsl:param name="generate.division.table.lot" select="0" />

    <xsl:param name="generate.book.figure.lot" select="0"/>
    <xsl:param name="generate.book.table.lot" select="0"/>

    <xsl:param name="section.label.includes.component.label" select="1" />
    <xsl:param name="section.autolabel" select="1"/>

    <!--

    I have been thinking of using the Processing Instruction (with
    parameter table-width), but I am not fluent in XSLT, and have not yet
    figured out what to do,

    -->

    <xsl:param name="default.table.width" select="'6in'"/>
    <xsl:param name="nominal.table.width" select="'6in'"/>

    </xsl:stylesheet>

     
  • Norman Walsh

    Norman Walsh - 2001-09-29

    Logged In: YES
    user_id=81663

    But if you look at the FO document, the table is defined
    to be 6in wide, the width you requested. The internal
    relative dimensions are necessary to implement the relative
    widths you selected:

    <fo:table table-layout="fixed" width="6in">
    <fo:table-column column-number="1" column-width="17%"/>

    It looks right to me...

     
  • Norman Walsh

    Norman Walsh - 2001-09-29
    • status: open --> closed-works-for-me
     
  • Michael(tm) Smith

    • labels: 322745 --> XSL
    • milestone: --> output: print/FO/PDF
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks