Modifying DITA OT Build Files for CSH
This topic describes how to modify the DITA OT Tookit files to allow context-sensitive Help map file and alias strings to be added to the Microsoft HTML Help output.
Before you start: Before starting this procedure, you must have DITA Open Toolkit 1.3 installed locally on your PC.
This procedure is used to modify the DITA Open Toolkit build files to allow an external map file reference and alias strings to be added to the HTML Help Project file before building, as part of the transformation to Microsoft HTML Help (CHM) format.
Open the file build_dita2htmlhelp.xml, from the DITA OT root directory, in a text editor or an XML editor.
Find the <target> node with a name of dita.map.htmlhelp. To the depends attribute, add dita.map.htmlhelp.ali.
Save the file.
Open the file map2hhc.xsl from the DITA OT /xsl directory, in a text editor or an XML editor.
Find the Command line parameters section of the file, and alter the HELPALIAS parameter line so it reads <xsl:param name="HELPALIAS" select="'hw_csh.ali'"</xsl:param> (where hw_csh.ali is the name of the alias file you want to include in the CHM file).
Also in the Command line parameters section, alter the HELPMAP parameter line so it reads <xsl:param name="HELPMAP" select="'hw_map.ali'"</xsl:param> (where hw_csh.h is the name of the alias file you want to include in the CHM file).
The main control build file for HTML Help transformations now knows to process a target of dita.
map.htmlhelp.ali, contained in an external resource file named dita_hw_csh.xml. This file is included in the build within the WinAnt build file. The transformation files now include the necessary information to add an include line in the [ALIAS] and [MAP] sections of the HHP file.