| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- This file is part of the DITA Open Toolkit project hosted on
- Sourceforge.net. See the accompanying license.txt file for
- applicable licenses.-->
- <!-- (c) Copyright IBM Corp. 2006 All Rights Reserved. -->
- <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="${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}"/>
- <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="${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 type="regexp"
- from="^(${tempdirToinputmapdir.relative.value})(.*?)(\.(xml|dita))$$"
- to="\2${out.ext}"/>
- <xmlcatalog refid="dita.catalog"/>
- </xslt>
- </target>
- </project>
|