<refentry xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:xi="http://www.w3.org/2001/XInclude"
          xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          version="5.0" xml:id="highlight.source">
<refmeta>
<refentrytitle>highlight.source</refentrytitle>
<refmiscinfo class="other" otherclass="datatype">boolean</refmiscinfo>
</refmeta>
<refnamediv>
<refname>highlight.source</refname>
<refpurpose>Should the content of <tag>programlisting</tag>
be syntactically highlighted?</refpurpose>
</refnamediv>

<refsynopsisdiv>
<src:fragment xml:id="highlight.source.frag">
<xsl:param name="highlight.source" select="0"/>
</src:fragment>
</refsynopsisdiv>

<refsection><info><title>Description</title></info>

<para>When this parameter is non-zero, the stylesheets will try to do
syntax highlighting of the content of the <tag>programlisting</tag> 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.</para>

<para>In order to use this extension, you must add
<filename>xslthl.jar</filename> to your Java classpath. You can
download this software from <link xlink:href="http://sourceforge.net/projects/xslthl">the XSLT syntax highlighting project</link> at SourceForge.</para>

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

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

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

<para>You can specify the language for each programlisting by using the <tag class="attribute">language</tag> attribute. The
<parameter>highlighting.default.language</parameter> parameter can be used for specifying the
language to be used for programlistings without a <tag class="attribute">language</tag> attribute.</para>

</refsection>
</refentry>
