After setting up the Ant environment, you can build the
DITA output by running the 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. If you are using the
"Full Easy Install" package, running the "startcmd" batch file in
that directory will give you a prompt that is already set up for the
following commands.
- You can build all demos in the DITA directory
Input ant
all -f build_demo.xml
The building process will
create an /out/ directory and put the output files in
subdirectories that parallel the source directory.
- You can also rebuild specific DITA sample files after running
the full demo.
First you need to remove part of the output
by specifying a "
clean" target, and then rebuild
the output. For example: To rebuild FAQ demo, run the following
two commands:
ant clean.demo.faq -f build_demo.xml
ant demo.faq -f build_demo.xml
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_demo.xml file.
Or, input ant -projecthelp -f build_demo.xml for
a full list information.
- You can also build your own selections using a prompted build.
Input ant
-f build_demo.xml
Ant will prompt you for the input
file, output directory, and transform type. Values on these parameters
are case sensitive.
To set up your own reusable Ant builds, with access to the
full range of DITA-OT parameters, start by using the samples provided
in samples/ant_samples/. That directory contains
a sample Ant script for each common output format.
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.