highlight.source
Prev | Miscellaneous | Next

## highlight.source

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

## Synopsis

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

## Description

When this parameter is non-zero, the stylesheets will try to do syntax highlighting of the content of the `programlisting` element. The highlighting is done by the XSLTHL extension module. This is an external Java library which is not part of the DocBook XSL distribution.

In order to use this extension, you must add `xslthl.jar` to your Java classpath. You can download this software from the XSLT syntax highlighting project at SourceForge.

The configuration of syntax highlighting is stored in `highlighting/xslthl-config.xml`. The Java property `xslthl.config` must point to this file (using URL syntax).

This extension is known to work with Saxon 6.5.x. Here is an example of a modified Saxon command:

    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 the language for each programlisting by using the `language` attribute. The `highlighting.default.language` parameter can be used for specifying the language to be used for programlistings without a `language` attribute.

Prev | Up | Next
pgwide.properties | Home | highlight.default.language