Download, install and use a plug-in

DITA Open Toolkit 1.2 and above provides a new function to help users to download, install and use plug-ins for DITA Open Toolkit. You can download, install and use a created plug-in. DITA Open Toolkit loads the plug-ins each time when a build is invoked.

Before using a plug-in, ensure you have accomplished two tasks below:
  1. Go to the available Web site, such as the DITA OT SourceForge Web site, to download the DITA OT base binary file. Download a DITA OT plug-in binary file, such as
  2. Extract the plug-in package to /demo directory of DITA OT root directory. For example, extract to /demo directory.
  3. On the command line of the DITA OT root directory, enter either the Ant or Java command line to execute the new function provided by the plug-in. For example, under the DITA OT root directory, type java -jar lib\dost.jar /i:demo\apiref\sample\apiPackage1.ditamap /ditaext:.dita /transtype:xhtml on the command line. The messages displayed on the screen will show the building process of apiPackage1.ditamap file in sample folder. If this plug-in is installed successfully, a message BUILD SUCCESSFUL appears on the screen when building ends. If the plug-in is not installed or cannot function, the message BUILD FAILED displays.
  4. If you want to remove the plug-in, remove the directory containing the plug-in files.
Note: The plug-in is integrated to toolkit every time when a build is invoked. You only need to unzip the package to the specific directory.

If the implemented plug-in depends on another plug-in, which is not installed in your local workstation, the installed plug-in cannot work. Thus a dependency track checks whether the installed plug-in is about to be loaded or not when the transformation pipeline is invoked.

There is no function provided by plug-ins in default build.xml file. You need to customize build.xml file if you want to use plug-in's function in it. Before running customized build.xml file with plug-in's function, you need to execute an installer program to update and integrate the installed plug-ins. Otherwise, the plug-ins you want to use might not be loaded.

Here is how to execute the installer program under the DITA OT root directory. Type java -cp lib\dost.jar org.dita.dost.platform.Integrator on the command line or use ant -f integrator.xml to execute the ANT script. The installer program will be invoked to integrate the plug-ins with DITA OT.