<?xml version="1.0" encoding="UTF-8"?>
<!-- This file is part of the DITA Open Toolkit project hosted on 
 Sourceforge.net. See the accompanying license.txt file for 
 applicable licenses.-->
<!DOCTYPE reference PUBLIC "-//OASIS//DTD DITA Reference//EN"
 "reference.dtd">
<reference id="processing-pipeline-modules" xml:lang="en-us">
<title>Processing modules in the DITA-OT</title>
<shortdesc>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.</shortdesc>
<refbody>
<section><p>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.</p><p>For
example, XHTML processing is controlled by the <filepath>dita2xhtml.xsl</filepath> file
inside the <filepath>xsl\</filepath> directory. The shell begins by
importing common rules applicable to all general topics (<filepath>xslhtml\dita2htmlImpl.xsl</filepath>).
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.</p><p>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.</p></section>
</refbody>
</reference>
