How to use custom syntax highlighter styles in DocBook 5.0
I have syntax highlighting on a docbook using a custom language highlighter based on 开发者_如何学Gothe c++ example.
How can I use different styles for the same highlighter type?
for instance:
<highlighter type="keywords">
<keyword>char</keyword>
<keyword>const</keyword>
<keyword>double</keyword>
<keyword>true</keyword>
<style>keyword</style>
</highlighter>
<highlighter type="keywords">
<keyword>Hotspot</keyword>
<keyword>Character</keyword>
<keyword>Region</keyword>
<style>class</style>
the second load of keywords should highlight with the style 'class' but how do I define and test for this non-default style?
Solved:
<xsl:template match='xslthl:class' mode="xslthl">
<b style="color: green"><xsl:apply-templates/></b>
</xsl:template>
the 'mode' attribute seems vital
精彩评论