DITA Open Toolkit, or DITA-OT for short, is an open-source publishing engine for content authored in the Darwin Information Typing Architecture.
Visit the project website at dita-ot.org for documentation, information about releases, and download packages.
For information on additional DITA and DITA-OT resources, see SUPPORT. To report a bug or suggest a feature, create an issue. For more information on how you can help contribute to the project, see CONTRIBUTING.
To build and run DITA-OT, you’ll need Java Development Kit (JDK), version 17 or newer.
You can download the OpenJDK from AdoptOpenJDK.
- Download the distribution package from dita-ot.org/download.
- Extract the contents of the package to the directory where you want to install DITA-OT.
Installing via Homebrew
On macOS and Linux, you can also install DITA-OT using the Homebrew package manager:
brew install dita-ot
Homebrew will automatically download the latest version of the toolkit, install it in a subfolder of the local package Cellar and symlink the dita
command to the bin
subfolder of the Homebrew installation directory.
Note
Homebrew’s default installation location depends on the operating system architecture:
/usr/local
on macOS Intel/opt/homebrew
on macOS ARM/home/linuxbrew/.linuxbrew
on Linux
You can generate output using the dita
command-line tool included with DITA Open Toolkit.
-
On the command line, change to the
bin
folder of the DITA-OT installation directory:cd path/to/dita-ot-dir/bin
-
Run the
dita
command to generate output:dita --input=input-file --format=format [options]
where:
input-file
is the DITA map or DITA file that you want to processformat
is the output format (or “transformation type”)
See the documentation for arguments and options.
Building the toolkit from source code and compiling the distribution package
- Clone the DITA-OT Git repository, including submodules:
git clone --recurse-submodules git://github.com/dita-ot/dita-ot.git
- Change to the DITA-OT directory:
cd dita-ot
- In the root directory, run Gradle to compile the Java code and install plugins:
./gradlew
./gradlew check
All tests are run by GitHub Actions test workflow on each push and for every pull request.
Requirements:
- Node.js
Prettier is used retain consistent Java formatting.
- Run Prettier:
npm run fmt
-
In the root directory, set up the build environment:
./gradlew
-
Build the distribution packages:
./gradlew dist
Distribution packages are built in the
build/distributions
directory.If Gradle 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 theGRADLE_OPTS
environment variable to a value like-Xmx1024m
.For more information on the
-Xmx
option, see the Java SE Documentation.
DITA Open Toolkit is licensed for use under the Apache License 2.0.