<refentry xmlns:src="http://nwalsh.com/xmlns/litprog/fragment"
          xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
          id="highlight.source">
<refmeta>
<refentrytitle>highlight.source</refentrytitle>
<refmiscinfo role="type">boolean</refmiscinfo>
</refmeta>
<refnamediv>
<refname>highlight.source</refname>
<refpurpose>Should be content of <sgmltag>programlisting</sgmltag>
syntactically highlighted?</refpurpose>
</refnamediv>

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

<refsect1><title>Description</title>

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

<para>In order to use this extension, you must add
<filename>xslthl.jar</filename> into your Java classpath. You can
download this software from <ulink
url="http://sourceforge.net/projects/xslthl"/>.</para>

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

<para>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:</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 language for each programlisting using <sgmltag
class="attribute">language</sgmltag> attribute. Parameter
<parameter>highlighting.default.language</parameter> can be used for specifying
language to be used for programlistings without <sgmltag
class="attribute">language</sgmltag> attribute.</para>

</refsect1>
</refentry>
