| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596 |
- <?xml version="1.0" encoding="UTF-8"?>
- <!-- This file is part of the DITA Open Toolkit project.
- See the accompanying license.txt file for applicable licenses.-->
- <project xmlns:dita="http://dita-ot.sourceforge.net" name="dita2html5">
-
- <target name="dita2html5"
- depends="html5.init,
- build-init,
- preprocess,
- html5.topic,
- html5.map,
- html5.css"/>
- <target name="html5.init">
- <property name="html-version" value="html5"/>
- <condition property="args.xsl" value="${dita.plugin.org.dita.html5.dir}/xsl/dita2html5.xsl">
- <not>
- <isset property="args.xsl" />
- </not>
- </condition>
- <condition property="args.xhtml.toc.xsl" value="${dita.plugin.org.dita.html5.dir}/xsl/map2html5-cover.xsl">
- <not>
- <isset property="args.xhtml.toc.xsl" />
- </not>
- </condition>
- <condition property="html5.nav-toc" value="${nav-toc}" else="none">
- <isset property="nav-toc"/>
- </condition>
- </target>
-
- <target name="html5.topic.init" unless="noMap">
- <loadfile property="html5.map" srcfile="${dita.temp.dir}/${user.input.file.listfile}">
- <filterchain>
- <headfilter lines="1"/>
- </filterchain>
- </loadfile>
- <makeurl property="html5.map.url" file="${dita.temp.dir}/${html5.map}"/>
- </target>
-
- <target name="html5.topic"
- depends="html5.topic.init,
- xhtml.init,
- xhtml.image-metadata,
- dita.topics.html5.common,
- dita.inner.topics.html5.common"/>
-
- <target name="dita.topics.html5.common" unless="noTopic" if="old.transform">
- <topics.html>
- <dita:extension id="dita.conductor.html5.param" behavior="org.dita.dost.platform.InsertAction"/>
- </topics.html>
- </target>
-
- <target name="dita.inner.topics.html5.common" unless="noTopic" if="inner.transform">
- <topics.html>
- <dita:extension id="dita.conductor.html5.param" behavior="org.dita.dost.platform.InsertAction"/>
- <!--New,To generate© all dita files in the inputmap.dir,not all files in dita.temp.dir -->
- <mapper type="regexp"
- from="^(${tempdirToinputmapdir.relative.value})(.*?)(\.(\w+))$$"
- to="\2${out.ext}"/>
- </topics.html>
- </target>
-
- <target name="html5.map"
- depends="dita.map.xhtml.init,
- dita.map.html5.toc"/>
-
- <target name="dita.map.html5.toc"
- unless="noMap"
- description="Build HTML5 TOC file">
- <map.html>
- <dita:extension id="dita.conductor.html5.toc.param" behavior="org.dita.dost.platform.InsertAction"/>
- </map.html>
- </target>
-
- <target name="html5.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.html5.dir}/css" includes="*.css"/>
- </copy>
- <!-- Copy user specify css file when required -->
- <antcall target="html5.copy-css-user"/>
- </target>
-
- <target name="html5.copy-css-user" if="user.copycss.yes">
- <copy file="${args.css.real}" todir="${user.csspath.real}"/>
- </target>
-
- </project>
|