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.

If you could file a bug report on the DocBook SourceForge site, this will get fixed by the next release. In the interim, you could use tabstyle="textbox-table" instead.

Bob Stayton
Sagehill Enterprises
[email protected]


----- Original Message ----- From: "Robert Nagle" <[email protected]>
To: <[email protected]>
Sent: Tuesday, November 23, 2010 11:31 AM
Subject: [docbook-apps] setting class values for HTML elements (tables?)


Hi, there, I am aware of how to set class values for docbook elements
for HTML output. I am using the latest non-namespaced docbook
stylesheets.  However, this trick does not seem to work for the
INFORMALTABLE element.

The syntax and spelling looks right. Perhaps this trick only works for
certain elements but not others. If so, is there any kind of rule for
what kinds of elements this would work for?  maybe this is a bug?

Robert

********************************************

THIS WORKS:

   <xsl:template match="pa...@role = 'first-para']" mode="class.value">
       <xsl:value-of select="'first-para'"/>
   </xsl:template>


THIS DOES NOT WORK:

   <xsl:template match="informaltab...@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).


--
Robert Nagle
12777 Ashford Point Dr #1417
Houston, Texas 77082
713 893 3424
htpt://www.robertnagle.info

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]





---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to