Datei build.xml

Im folgenden sehen Sie den Inhalt der Build-Datei zum Testprojekt. Wenn Sie später das Testprojekt kopieren und umbenennen für ein neues DITA-Projekt, ist die Datei build.xml immer unverändert im Projektordner enthalten.

<?xml version="1.0" encoding="UTF-8" ?>
<!-- (c) 2010 Softwijs. -->
<!-- Ant script for Dita projects -->
<!-- Transformation type depends of the parameter in runbuild.bat. -->
<!-- basedir is the project directory with the buildfile. -->

<project name="Ditaproject" default="dita2pdf" basedir=".">
<!-- prefix for environment variabeles so Ant can use them -->
<property environment="env"/>
<!-- Read the properties file with settings -->
<property file="${user.home}${file.separator}build.properties"/>
<!-- Define the name of the (master) ditamap, value of pubname in runbuild.bat -->
<property name="mapfile" value="${pubname}.ditamap"/>
<!-- Define the (absolute) path of the project directory with the ditamap -->
<dirname property="projdir" file="${ant.file}"/>
<!-- make the temp directory clean -->
<property name="clean.temp" value="yes"/>
<echo>Processing of ditamap ${pubname} is started.</echo>
<echo/>

<echo>******************************************</echo>
<echo>* basedir      = ${basedir}</echo>
<echo>* projdir      = ${projdir}</echo>
<echo>* pubname      = ${pubname}</echo>
<echo>* mapfile      = ${mapfile}</echo>
<echo>* java version = ${java.version}</echo>
<echo>* ant version  = ${ant.version}</echo>
<echo>******************************************</echo>
<!-- Import integrator.xml from the toolkit directory -->
<import file="${dita-ot-dir}${file.separator}integrator.xml"/>

<target name="dita2pdf" depends="integrate">
<ant antfile="${dita-ot-dir}${file.separator}build.xml" target="init">
<property name="args.input" value="${projdir}${file.separator}${mapfile}"/>
<property name="output.dir" value="${out-dir}${file.separator}${pubname}${file.separator}pdf"/>
<property name="transtype" value="pdf2"/>
<!-- Change the standaarddir for pdf customizations -->
<property name="customization.dir" value="${basedir}${file.separator}customization"/>
<!-- Settings for links in pdf output when using collection-type and related links-->
<!-- Acceptable values: none , all , nofamily. -->
<property name="args.fo.include.rellinks" value="nofamily"/>
</ant>
</target>

<target name="dita2xhtml" depends="integrate">
<ant antfile="${dita-ot-dir}${file.separator}build.xml" target="init">
<property name="args.input" value="${projdir}${file.separator}${mapfile}"/>
<property name="output.dir" value="${out-dir}${file.separator}${pubname}${file.separator}xhtml"/>
<property name="transtype" value="xhtml"/>
<!--  Change css file  -->
<property name="args.css" value="customization${file.separator}swdita.css"/>
<property name="args.csspath" value="css"/>
<property name="args.copycss" value="yes"/>
<!-- Change header and footer -->
<property name="args.hdr" value="${projdir}${file.separator}customization${file.separator}swheader.html"/>
<property name="args.ftr" value="${projdir}${file.separator}customization${file.separator}swfooter.html"/>
</ant>
</target>

<target name="dita2tocjs" depends="integrate">
<ant antfile="${dita-ot-dir}${file.separator}build.xml" target="init">
<property name="args.input" value="${projdir}${file.separator}${mapfile}"/>
<property name="output.dir" value="${out-dir}${file.separator}${pubname}${file.separator}tocjs"/>
<property name="transtype" value="tocjs"/>
<!--  Change css file  -->
<property name="args.css" value="customization${file.separator}swdita.css"/>
<property name="args.csspath" value="css"/>
<property name="args.copycss" value="yes"/>
<!-- Change header and footer -->
<property name="args.hdr" value="${projdir}${file.separator}customization${file.separator}swheader.html"/>
<property name="args.ftr" value="${projdir}${file.separator}customization${file.separator}swfooter.html"/>
</ant>
</target>

<target name="dita2epub" depends="integrate">
<ant antfile="${dita-ot-dir}${file.separator}build.xml" target="init">
<property name="args.input" value="${projdir}${file.separator}${mapfile}"/>
<property name="output.dir" value="${out-dir}${file.separator}${pubname}${file.separator}epub"/>
<property name="epub.pubid.uri.stub" value="http://www.softwijs.nl/"/>
<property name="transtype" value="epub"/>
<!--  Change css file -->
<property name="args.css" value="customization${file.separator}ebook.css"/>
<property name="args.csspath" value="css"/>
<property name="args.copycss" value="yes"/>
</ant>
</target>

<target name="dita2kindle" depends="integrate">
<ant antfile="${dita-ot-dir}${file.separator}build.xml" target="init">
<property name="args.input" value="${projdir}${file.separator}${mapfile}"/>
<property name="output.dir" value="${out-dir}${file.separator}${pubname}${file.separator}kindle"/>
<property name="transtype" value="kindle"/>
<!--  Change css file -->
<property name="args.css" value="customization${file.separator}ebook.css"/>
<property name="args.csspath" value="css"/>
<property name="args.copycss" value="yes"/>
</ant>
</target>
</project>