Description: The DITA-OT processing pipeline is implemented using Ant. Individual modules within the Ant script are generally implemented in either Java or XSLT, depending on a variety of factors, such as performance or requirements for customization. Virtually all Ant and XSLT modules are extensible by adding a plug-in to the toolkit; new Ant targets may be inserted before or after common processing, and new rules may be imported into common XSLT modules to override default processing.

# Processing modules in the DITA-OT

The DITA-OT processing pipeline is implemented using Ant. Individual modules within the Ant script are generally implemented in either Java or XSLT, depending on a variety of factors, such as performance or requirements for customization. Virtually all Ant and XSLT modules are extensible by adding a plug-in to the toolkit; new Ant targets may be inserted before or after common processing, and new rules may be imported into common XSLT modules to override default processing.

XSLT modules are all set up using shell files. Typically, each shell file begins by importing common rules that apply to all topics. This set of common processing may in turn import additional common modules, such as those used for reporting errors or determining the document locale. After the common files, additional imports may be included in order to support processing for DITA Specializations.

For example, XHTML processing is controlled by the dita2xhtml.xsl file inside the xsl\ directory. The shell begins by importing common rules applicable to all general topics (xslhtml\dita2htmlImpl.xsl). After that, additional XSLT overrides are imported for specializations that require modified processing. For example, an override for reference topics is imported in order to add default headers to property tables. Additional modules are imported for tasks, for the highlighting domain, and for several other standard specializations. After the standard XSLT overrides, plug-ins may add in additional processing for local styles or for additional specializations.

Java modules are typically used when XSLT is a poor fit, such as for processes that work directly with the file system to copy files, or which make use of standard Java libraries (like those used for index sorting). Java modules are also used in many cases where a step involves copying files, such as the initial process where source files are parsed and copied to a temporary processing directory.

Parent topic: DITA Open Toolkit Architecture