Menu

#1151 can't set class values for table or informaltable

output: HTML
closed-fixed
XSL (1066)
5
2010-12-10
2010-11-23
No

for HTML output Docbook provides a way to add a class declaration to an element.

However, this method does not work for the table or informaltable element. Bob Staynton has confirmed this bug here http://lists.oasis-open.org/archives/docbook-apps/201011/msg00139.html (pasted below).

I'm using 1.76.1 docbook XSL, no namespace.

THIS DOES NOT WORK:

<xsl:template match="informaltable[@role = 'textbox-table']"
mode="class.value">
<xsl:value-of select="'textbox-table'"/>
</xsl:template>

Input:
<informaltable xml:id="test-text-table" role="textbox-table">
<tgroup cols="1">
<!-- <colspec />
<colspec />-->
<tbody role="textbox-table">
<row>
<entry>Can you see this table? </entry>
</row>
</tbody>
</tgroup>
</informaltable>

The result looks like this:

<div class="informaltable"><a id="test-text-table"/>
<table border="1"><colgroup><col/></colgroup><tbody><tr><td>Can
you see this table? </td></tr></tbody></table>

This is bad because I expect either the <div class="informaltable">
or <table border="1"> to have a class of textbox-table.

(The id refers to the xml:id value of test-text-table; not relevant here).

Bob S. writes:

I investigated this issue, and I would classify this as a bug. Both table and informaltable will output a class attribute value that matches the @tabstyle attribute if there is one on the table or informaltable. That behavior predates the implementation of mode="class.value". But there is no provision for using the mode="class.value" to override it, and this is the bug. The table templates should pass the tabstyle attribute as the default value for the mode to override if desired.

Discussion

  • Keith Fahlgren

    Keith Fahlgren - 2010-11-23
    • labels: 1168228 --> XSL
    • assigned_to: abdelazer --> nobody
     
  • Robert Stayton

    Robert Stayton - 2010-11-26

    A fix for this issue has been added to the current codebase.
    Please test the fix with the latest snapshot from:

    http://docbook.sourceforge.net/snapshots/

     
  • Robert Stayton

    Robert Stayton - 2010-11-26
    • assigned_to: nobody --> bobstayton
    • status: open --> pending-fixed
     
  • SourceForge Robot

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

     
  • SourceForge Robot

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