INSTALLATION of the docbook highlighter

1. Copy the highlighting directory from the documentation/docbook directory to the programming/doc/toolchain directory.
These files contain the highlighter type definitions for each language (string, comment, keyword...) and also a common.xsl file
which defines transformation templates for highlighting.

2. To make it clearer, I have separated xml and xsl files into two different folders.

3. Add a new property in the programming/doc/toolchain/doc_path.xml file refering to this new directory.

   <!-- Directory of xml configuration files for highlighting -->
   <property name="docs.highlighting.dir" value="${docs.toolchain.dir}/highlighting"/>

3. Modify the -docbookTransform target in the programming/doc/toolchain/doc.xml file:

Remove:


		<!-- Do the real conversion, docbook to pdf or html -->
		<xslt basedir="${docs.src.dir}" in="${docs.tmp.dir}/profiled.xml" out="${docbookOutputFile}" style="${docbookStyle}" force="yes">
			<xmlcatalog refid="docbookcatalog" />
			<param name="TODAY" expression="${TODAY}" />
			<!-- the date for the first page -->
			<param name="VERSION" expression="${version}" />
			<!-- the version number, for the first page -->

			<!-- Output dir for the chunked stylesheet-->
		   <param name="base.dir" expression="${docs.html.multiple.dir}"/>

			<classpath>
				<fileset dir="${docs.lib.dir}">
					<include name="**/*.jar" />
				</fileset>
			</classpath>
		</xslt>


And replace by:

      <java classname="com.icl.saxon.StyleSheet" dir="${docbookOutputDir}" fork="true">
			<classpath refid="docs.utils.classpath" />
         <jvmarg value="-Dxslthl.config=file://${docs.highlighting.dir}/xslthl-config.xml"/>
         <arg line="-o ${docbookOutputFile} ${docs.tmp.dir}/profiled.xml ${docbookStyle}"/>
      </java>

4. Add these lines in the programming/doc/toolchain/xsl/common.xsl files:


 <!--Import xsl file for highlightting-->
 <xsl:import href="highlighting.xsl"/>
 <!-- Active highlighting-->
 <xsl:param name="highlight.source" select="1"/>


5. To use it, you just to specify the language in your <programlisting> tags:

<programlisting language="java">
   public static void main(String[] args) {
      System.out.println("Hello world !!");
   }
</programlisting>

N.B.: xml:lang has been replaced by language in every programlisting tag.

6. Add the following lines in the programming/doc/toolchain/xsl/html.xsl to customize colors:

 <!-- Import profiled highlighting color -->
 <xsl:import href="../highlighting/xsl/html-hl.xsl" />

7. In the same way, add the following lines in the programming/doc/toolchain/xsl/html.xsl to customize colors:

 <!-- Import profiled highlighting color -->
 <xsl:import href="../highlighting/xsl/fo-hl.xsl" />
