For reasons unknown to me, only the variablelist element gets a class attribute in HTML output, not varlistentry. Perhaps that is a deficiency that should be corrected in the stylesheets. In any case, this additional customization will make it work for varlistentry elements:

<xsl:template match="varlistentry">
 <dt>
   <xsl:apply-templates select="." mode="class.attribute"/>
   <xsl:call-template name="anchor"/>
   <xsl:apply-templates select="term"/>
 </dt>
 <dd>
   <xsl:apply-templates select="." mode="class.attribute"/>
   <xsl:apply-templates select="listitem"/>
 </dd>
</xsl:template>


Bob Stayton
Sagehill Enterprises
[EMAIL PROTECTED]


----- Original Message ----- From: "Halm Reusser" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Monday, November 10, 2008 7:25 AM
Subject: [docbook] Generating custom class attribute for HTML output


Hi all,

What I have:

       <variablelist>
         <varlistentry role="REQ">
         <term>REQ-</term>
         <listitem>
           <para>This is an example requirement.</para>
         </listitem>
        </varlistentry>
       </variablelist>

What I want in my HTML output:

<dl>
<dt class="REQ"> ... </dt>
<dd class="REQ"> ... </dd>
</dl>

In the default, this do not work.

So I'm refering to http://www.sagehill.net/docbookxsl/HtmlCustomEx.html#CustomClassValues

where I added this snippet to my HTML customization layer:

<xsl:template match="[EMAIL PROTECTED] = 'REQ']" mode="class.value">
 <xsl:value-of select="'REQ'"/>
</xsl:template>

But this also not get me the wished result? Any ideas?

Many thanks in advance.

Halm

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