sorry for the noise on this one.
After looking more closely at the template, I saw I could populate the
$class variable (and hence the attribute) with :

<xsl:template match="d:table" mode="class.value">
    <xsl:value-of select="'tabular-wrapper'" />
  </xsl:template>

--Tim


On Thu, Aug 29, 2019 at 9:27 AM Tim Arnold <[email protected]> wrote:

> Hi,
> I'm converting DocBook 5 to html (docbook-xsl-1.79.2) with a customization
> layer.
> I now need to wrap my table elements inside a div with a particular class
> (say 'tabular-wrapper' for example).
> My tables in the DocBook XML source are HTML tables.
>
> Currently the tables are rendered by the stylesheet as:
>     <div id="the_id" class="">
>         <div class="-contents">
>           <table class="tabular"> ... </table>
>         </div>
>     </div>
>
> I want the tables to look like this:
>     <div id="the_id" class="tabular-wrapper">
>         <div class="-contents">
>           <table class="tabular"> ... </table>
>         </div>
>      </div>
>
> or perhaps
>     <div id="the_id" class="">
>         <div class="-contents tabular-wrapper">
>           <table class="tabular"> ... </table>
>         </div>
>      </div>
>
> It appears that the $class variable the formal.xsl stylesheet
> (htmlTable.with.caption template) refers to is blank.
> <div class="{$class}">
>
> As a last resort, I can copy the template into my customization layer with
> appropriate edits.
>
> My question is whether that is the best I can do?
> Or is there a way to populate the $class variable just for tables?
>
> thanks for any ideas!
> --Tim
>

Reply via email to