| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!--
- This file is part of the DITA Open Toolkit project.
- Copyright 2006 IBM Corporation
- See the accompanying LICENSE file for applicable license.
- -->
- <project name="dita2troff">
- <target name="dita2troff-ast.init">
- <property name="troff-ast.xsl" location="${dita.plugin.org.dita.troff.dir}/xsl/dita2troff-ast-shell.xsl"/>
- </target>
- <target name="dita2troff.init">
- <property name="out.ext" value=".cli"/>
- <property name="troff.step2.xsl" location="${dita.plugin.org.dita.troff.dir}/xsl/dita2troff-step2-shell.xsl"/>
- </target>
- <target name="dita2troff"
- depends="dita2troff-ast.init, dita2troff.init, build-init, preprocess, dita.topic.troff-ast, dita.topic.troff, dita.inner.topic.troff">
- </target>
- <target name="dita.topic.troff-ast" unless="noTopic" depends="dita2troff-ast.init"
- description="Build Troff-specific AST output from dita topics.">
- <xslt basedir="${dita.temp.dir}"
- destdir="${dita.temp.dir}" includesfile="${dita.temp.dir}${file.separator}${fullditatopicfile}"
- extension=".dita"
- classpathref="dost.class.path"
- style="${troff-ast.xsl}">
- <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
- <param name="defaultLanguage" expression="${default.language}"/>
- <mapper type="glob" from="*" to="*.ast" />
- <xmlcatalog refid="dita.catalog"/>
- </xslt>
- <move todir="${dita.temp.dir}">
- <fileset dir="${dita.temp.dir}" includes="**/*.ast" />
- <mapper type="glob" from="*.ast" to="*" />
- </move>
- </target>
- <target name="dita.topic.troff" unless="noTopic" if="old.transform"
- description="Build troff output from dita inner and outer topics,which will adjust the directory.">
- <xslt basedir="${dita.temp.dir}" destdir="${dita.output.dir}"
- includesfile="${dita.temp.dir}${file.separator}${fullditatopicfile}" extension="${out.ext}"
- classpathref="dost.class.path"
- style="${troff.step2.xsl}">
- <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
- <param name="OUTFORMAT" expression="${troff.outformat}" if="troff.outformat"/>
- <param name="defaultLanguage" expression="${default.language}"/>
- <mapper classname="org.dita.dost.ant.types.JobMapper" to="${out.ext}"/>
- <xmlcatalog refid="dita.catalog"/>
- </xslt>
- </target>
-
- <!--The new solution which divides the whole process into the inner and outer steps -->
- <target name="dita.inner.topic.troff" unless="noTopic" if="inner.transform"
- description="Build troff output from inner dita topics">
- <echo level="info">the ditmapoutputdir is ${dita.map.output.dir}</echo>
- <!-- step 2 -->
- <xslt basedir="${dita.temp.dir}" destdir="${dita.output.dir}"
- includesfile="${dita.temp.dir}${file.separator}${fullditatopicfile}" extension="${out.ext}"
- classpathref="dost.class.path"
- style="${troff.step2.xsl}">
- <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
- <param name="OUTFORMAT" expression="${troff.outformat}" if="troff.outformat"/>
- <mapper classname="org.dita.dost.ant.types.JobMapper" to="${out.ext}"/>
- <xmlcatalog refid="dita.catalog"/>
- </xslt>
- </target>
- </project>
|