Building output using Ant

You can build output by running the ant command and specifying the DITA-OT parameters at the command prompt. You also can use an Ant build script to provide the DITA-OT parameters.


  1. Run the startcmd file that is applicable for your operating system.
    The startcmd.bat and files are in the directory where you installed the DITA-OT.
  2. To provide the DITA-OT parameters from the command prompt, issue the following command:
    ant -Dargs.input=input-file -Dtranstype=transformation-type -Dparameter-name=value
    • install-dir is the DITA-OT installation directory path.
    • input-file is the DITA map or DITA file that you want to process.
    • transformation-type is the transformation type.
    • parameter-name is the name of an optional parameter.
    • value is an applicable value for the optional parameter.
    • output-dir is the output directory path for generated output.
    If you do not specify an output directory, the DITA-OT writes the output to the install-dir/out directory.
  3. If you use a build script, issue the following command:
    ant -f build-script target
    • build-script is name of the Ant build script.
    • target is an optional switch that specifies the name of the Ant target that you want to run. If you do not specify a target, the value of the @default attribute for the Ant project is used.