| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126 |
- <?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 xmlns:dita="http://dita-ot.sourceforge.net" name="dita2xhtml">
- <target name="dita2xhtml.init">
- <property name="html-version" value="xhtml"/>
- </target>
-
- <target name="dita2xhtml"
- depends="dita2xhtml.init,
- build-init,
- preprocess,
- xhtml.topics,
- dita.map.xhtml,
- copy-css">
- </target>
- <target name="dita.map.xhtml"
- depends="dita.map.xhtml.init, dita.map.xhtml.toc" />
- <target name="dita.map.xhtml.init" unless="noMap">
- <condition property="args.xhtml.toc.xsl" value="${dita.plugin.org.dita.xhtml.dir}/xsl/map2${html-version}-cover.xsl">
- <not>
- <isset property="args.xhtml.toc.xsl" />
- </not>
- </condition>
- <condition property="args.xhtml.toc" value="index">
- <not>
- <isset property="args.xhtml.toc" />
- </not>
- </condition>
- </target>
-
-
- <target name="dita.map.xhtml.toc"
- unless="noMap"
- description="Build HTML TOC file">
- <map.html>
- <dita:extension id="dita.conductor.xhtml.toc.param" behavior="org.dita.dost.platform.InsertAction"/>
- </map.html>
- </target>
-
- <macrodef name="map.html">
- <element name="params" optional="true" implicit="true"/>
- <sequential>
- <local name="xhtml.toc.output.dir"/>
- <condition property="xhtml.toc.output.dir" value="${output.dir}" else="${_dita.map.output.dir}">
- <isset property="inner.transform"/>
- </condition>
- <xslt
- basedir="${dita.temp.dir}"
- destdir="${xhtml.toc.output.dir}"
- includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}"
- classpathref="dost.class.path"
- style="${args.xhtml.toc.xsl}">
- <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
- <param name="OUTEXT" expression="${out.ext}" if="out.ext" />
- <param name="contenttarget" expression="${args.xhtml.contenttarget}" if="args.xhtml.contenttarget"/>
- <param name="CSS" expression="${args.css.file}" if="args.css.file" />
- <param name="CSSPATH" expression="${user.csspath}" if="user.csspath" />
- <param name="OUTPUTCLASS" expression="${args.xhtml.toc.class}" if="args.xhtml.toc.class" />
- <params/>
- <mergemapper to="${args.xhtml.toc}${out.ext}"/>
- <xmlcatalog refid="dita.catalog"/>
- </xslt>
- </sequential>
- </macrodef>
-
- <!-- Deprecated since 2.1 -->
- <target name="dita.out.map.xhtml.toc"
- unless="noMap" if="inner.transform"
- description="Build HTML TOC file,which will adjust the directory">
- <dita-ot-echo id="DOTX070W"><param name="1" value="dita.out.map.xhtml.toc"/></dita-ot-echo>
- <xslt
- basedir="${dita.temp.dir}"
- destdir="${output.dir}"
- includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}"
- classpathref="dost.class.path"
- style="${args.xhtml.toc.xsl}">
- <excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
- <param name="OUTEXT" expression="${out.ext}" if="out.ext" />
- <param name="contenttarget" expression="${args.xhtml.contenttarget}" if="args.xhtml.contenttarget"/>
- <param name="CSS" expression="${args.css.file}" if="args.css.file" />
- <param name="CSSPATH" expression="${user.csspath}" if="user.csspath" />
- <param name="OUTPUTCLASS" expression="${args.xhtml.toc.class}" if="args.xhtml.toc.class" />
- <dita:extension id="dita.conductor.xhtml.toc.param" behavior="org.dita.dost.platform.InsertAction"/>
- <mapper type="glob"
- from="${user.input.file}"
- to="${args.xhtml.toc}${out.ext}" />
- <xmlcatalog refid="dita.catalog"/>
- </xslt>
- </target>
-
- <target name="copy-revflag" if="dita.input.valfile">
- <dita-ot-echo id="DOTA069W">
- <param name="1" value="copy-revflag"/>
- </dita-ot-echo>
- </target>
-
- <target name="copy-css" unless="user.csspath.url" description="Copy CSS files">
- <condition property="user.copycss.yes">
- <and>
- <equals arg1="${args.copycss}" arg2="yes"/>
- <isset property="args.css.present"/>
- </and>
- </condition>
- <property name="user.csspath.real" location="${output.dir}/${user.csspath}"/>
- <mkdir dir="${user.csspath.real}"/>
- <!-- Always copy system default css files -->
- <copy todir="${user.csspath.real}">
- <fileset dir="${dita.plugin.org.dita.xhtml.dir}/resource" includes="*.css"/>
- </copy>
- <!-- Copy user specify css file when required -->
- <antcall target="copy-css-user"/>
- </target>
- <target name="copy-css-user" if="user.copycss.yes">
- <copy file="${args.css.real}" todir="${user.csspath.real}"/>
- </target>
-
- </project>
|