highlight.source — Should be content of programlisting syntactically highlighted?


<xsl:param name="highlight.source" select="0"></xsl:param>


When this parameter is non-zero, the stylesheets will try to do syntax highlighting in content of programlisting element.

In order to use this extension, you must add xslthl.jar into your Java classpath. You can download this software from

Configuration of syntax highlighting is stored inside highlighting/xslthl-config.xml file. Java property xslthl.config must be pointing to this file using URL.

This extension is known to work with Saxon 6.5.x. When using syntax highlighting, do not forget to modify your classpath and point to the configuration file using property. Modified Saxon command can look like:

java -cp c:\batch\;…;c:\path\to\xslthl.jar -Dxslthl.config=file:///c:/docbook-xsl/highlighting/xslthl-config.xml … com.icl.saxon.StyleSheet …

You can specify language for each programlisting using language attribute. Parameter highlighting.default.language can be used for specifying language to be used for programlistings without language attribute.