The DITA Open Toolkit, or DITA-OT for short, is an open-source tool that provides processing for OASIS DITA content. See dita-ot.org for documentation, information about releases, and download packages.
To build and use DITA-OT, you’ll need:
- Java Development Kit 7 or newer
- Apache Ant 1.9.4 or newer
- Apache Ivy 2.3.0 or newer
If Ant throws an error like unknown protocol: plugin or unknown protocol: cfg, your Ant installation may be outdated. Try installing a newer version of Ant.
-
Clone the DITA-OT Git repository:
git clone git://github.com/dita-ot/dita-ot.git -
Fetch the submodules:
git submodule update --init --recursive -
In the root directory, run
antto compile the Java code and install plugins:ant
-
Run the
ditacommand to generate output:src/main/bin/dita [options]See the documentation for arguments and options.
-
In the root directory, run
antto compile the Java code and install plugins:ant -
Add these files and directories to the
CLASSPATHenvironment variable:src/main/src/main/lib/dost.jarsrc/main/lib/dost-configuration.jarsrc/main/lib/xercesImpl.jarsrc/main/lib/xml-apis.jarsrc/main/lib/commons-codec.jarsrc/main/lib/commons-io.jarsrc/main/lib/saxon-dom.jarsrc/main/lib/saxon.jarsrc/main/lib/xml-resolver.jarsrc/main/lib/icu4j.jar
-
Build distribution packages:
ant distDistribution packages are built in the
targetdirectory.If Ant throws an error like
java.lang.OutOfMemoryError: Java heap space, you probably need to increase the maximum Java heap size. One way to do this is to set theANT_OPTSenvironment variable to a value like-Xmx1024m.For more information on the
-Xmxoption, see Java SE Documentation.
The DITA Open Toolkit is licensed for use under the Apache License 2.0.
