#920 fo: missing width on tables with multiple tgroups

closed-fixed
nobody
XSL (1066)
5
2007-09-02
2007-07-25
No

DocBook XML version 4.5
DocBook XSL version 1.73.0
Xalan J version 2.7.0

When using tables with multiple <tgroup>s, the <fo:table> tags generated for the second and subsequent <tgroup>s do not get a width="100%" attribute set like they should.

Simple test case is included below; resulting .fo file is attached ("cleaned-up" for readability by making every XML start- and end- tag begin on a new line).

In the .fo file, the <fo:table> tags associated with the <tgroup>s in the test case are located at lines 572, 590, and 608. The <fo:table> at line 572 includes the width="100%" attribute; the other two do not. This happens with no customization layer at all, and when passing in the default.table.width parameter.

---- TEST CASE ----
<article>
<title>Table Test</title>
<para>
The following table does not get the
<computeroutput>width="100%"</computeroutput> attribute set in
the <computeroutput>fo:table</computeroutput> block for the
second and subsequent <sgmltag>tgroup</sgmltag> groups:
</para>
<table>
<title>Broken Table</title>
<tgroup cols='2'>
<colspec colname='C1' colwidth='1*' />
<colspec colname='C2' colwidth='1*' />
<tbody>
<row><entry>0,0</entry><entry>1,0</entry></row>
</tbody>
</tgroup>
<tgroup cols='2'>
<colspec colname='C1' colwidth='1*' />
<colspec colname='C2' colwidth='1*' />
<tbody>
<row><entry>0,1</entry><entry>1,1</entry></row>
</tbody>
</tgroup>
<tgroup cols='2'>
<colspec colname='C1' colwidth='1*' />
<colspec colname='C2' colwidth='1*' />
<tbody>
<row><entry>0,2</entry><entry>1,2</entry></row>
</tbody>
</tgroup>
</table>
</article>

Discussion

  • darkfoxprime

    darkfoxprime - 2007-07-25

    Cleaned up .fo file from table width test case

     
  • Michael(tm) Smith

    • summary: missing width on tables with multiple tgroups --> fo: missing width on tables with multiple tgroups
     
  • Mauritz Jeanson

    Mauritz Jeanson - 2007-08-18

    Logged In: YES
    user_id=582041
    Originator: NO

    Outputting a width attribute only once for tables with multiple tgroups was intentional. In fo/table.xsl, there was a comment saying

    "If this is the first tgroup, output the width attribute for the
    surrounding fo:table. (If this isn't the first tgroup, trying
    to output the attribute will cause an error.)"

    However, it is not clear what error this refers to. Setting a width attribute on all fo:tables does not cause any problems with FOP 0.93 or XEP 4.10 (in fact, it removes a couple of warnings from FOP). Therefore I have ventured to modify the stylesheet so that a width is output for all tgroups, under the assumption that the error is no longer relevant.

     
  • Mauritz Jeanson

    Mauritz Jeanson - 2007-08-18
    • status: open --> pending-fixed
     
  • SourceForge Robot

    • status: pending-fixed --> closed-fixed
     
  • SourceForge Robot

    Logged In: YES
    user_id=1312539
    Originator: NO

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 14 days (the time period specified by
    the administrator of this Tracker).

     

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