[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook-apps] <xsl:apply-templates select="." mode="class.attribute" />
Processing an element in that mode generates a
class attribute for the element being processed. It is applied by the
stylesheet just after the opening tag of the output element. In the
template with match="programlisting" in html/verbatim.xsl, its application looks
like this:
<pre>
<xsl:apply-templates
select="." mode="class.attribute"/>
That template in turn applies templates in
mode="class.value" to generate the attribute value string before it assembles
the <xsl:attribute> element. You can customize the
mode="class.value" to generate a different string value, and it will be used in
the class attribute. Because it uses a mode, you can add templates for
specific element selectors. For example:
<xsl:template match="programlisting[@role]"
mode="class.value">
<xsl:value-of
select="@role"/>
</xsl:template>
See this reference for more
information:
|
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]