Building output using the command-line tool

If you are unfamiliar with Ant, you can invoke the DITA Open Toolkit (DITA-OT) and build output from the command-line tool.
  1. Run the startcmd file that is applicable for your operating system.
    The startcmd.bat and startcmd.sh files are in the directory where you installed the DITA-OT.
  2. From the command prompt, issue the following command:
        java -jar lib/dost.jar /i:input-file /transtype:transformation-type /parameter-name:value
    where:
    • 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.
    If you do not specify an output directory, by default, the DITA-OT writes the output to the installation-directory\out directory.

The following command generates XHTML output for the sequence.ditamap file and specifies the output is written to the test directory

java -jar lib/dost.jar /i:samples/sequence.ditamap /outdir:test /transtype:xhtml

Was this helpful?