This topic describes detailed Ant tasks and scripts.
The build process including pre-process can be called by using an Ant script. The most important Ant scrip file is called build.xml, it defines and combines common pre-processing and output transformation routines, as well as extension points that allow DITA-OT Plug-ins to add to this common processing.
These ant scripts are in samples/ant_sample directory. They are simple and easy to learn. From these files, you can learn how to write your own Ant script to build your own process.
<?xml version="1.0" encoding="UTF-8" ?>
<project name="@PROJECT.NAME@_xhtml" default="@DELIVERABLE.NAME@2xhtml" basedir=".">
<property name="dita.dir" location="${basedir}/../.."/>
<target name="@DELIVERABLE.NAME@2xhtml">
<ant antfile="${dita.dir}${file.separator}build.xml">
<!-- please refer to the toolkit's document for supported parameters, and
specify them base on your needs -->
<property name="args.input" location="@DITA.INPUT@"/>
<property name="output.dir" location="@OUTPUT.DIR@"/>
<property name="transtype" value="xhtml"/>
</ant>
</target>
</project>
ant -f samples/ant_sample/template_xhtml.xml
The build will convert your input file to XHTML. Note that the build directly calls the Ant script build.xml, which is a common entry point for DITA-OT builds; it in turn imports all of the scripts mentioned above.