After setting up the Ant environment, you can build the DITA
output by running ant command.
Here are some samples to explain how to use Ant to build sample
output in the DITA directory.
Note: To run the Ant demo properly, you
should switch to the DITA installation directory under the command
prompt.
- You can build all demos in the DITA
directory.
Input ant all
The building process
will create an /out/ directory and puts the output files in
subdirectories that parallel the source directory.
- You can
also rebuild specific part of output of the DITA sample files.
You need
to remove part of the output first by specifying a
"clean" target, and then rebuild the output. For
example: To rebuild FAQ demo, input
ant
clean.demo.faq
ant demo.faq
Note: To
find out the complete list of targets you can clean and build, check the
name attributes for the target elements within the
build.xml file. Or, input ant -projecthelp for
information.
- You can also build assigned input to output
in a default and easy way.
Input ant
Ant will
prompt you for the input and output, and you need to input the
directories of input files and output with correctly upper or lower case.
You can reuse the targets provided by the
conductor.xml file in builds for your own DITA content by coping
the build.xml, conductor.xml, pretargets.xml, ditatargets.xml and
catalog-ant.xml files into a new directory and edit the
build.xml to specify your DITA files. Refer to Ant tasks and
tweaks for more information of those functions.
Note: To
troubleshoot problems in setting up Java, Ant, Saxon, or FOP, you will
get better information from the communities for those components rather
than the communities for the DITA. Of course, if you find issues relevant
to the DITA XSLT scripts (or have ideas for improving them), you are
encouraged to engage the DITA community.