<?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="dita2xhtml">
	
    <target name="dita2xhtml"
      depends="build-init, preprocess, dita.map.xhtml, copy-revflag, 
                     copy-css , dita.topics.xhtml, dita.inner.topics.xhtml, dita.outer.topics.xhtml">
    </target>

    <target name="dita.map.xhtml"
            depends="dita.map.xhtml.init, dita.map.xhtml.toc , dita.out.map.xhtml.toc" />

    <target name="dita.map.xhtml.init" description="">
        <condition property="out.ext" value=".html">
            <not>
                <isset property="out.ext" />
            </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" if="old.transform"
            description="Build HTML TOC file">
        <xslt processor="trax"
              basedir="${dita.temp.dir}"
              destdir="${output.dir}"
              includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}"
              classpathref="dost.class.path"
              style="${dita.script.dir}${file.separator}map2xhtmtoc.xsl">
        	<excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
            <param name="DITAEXT" expression="${dita.ext}" if="dita.ext" />
            <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" xmlns:dita="http://dita-ot.sourceforge.net"/>
            <mapper type="glob"
                    from="*${dita.input.filename}"
                    to="*${args.xhtml.toc}${out.ext}" />
          <xmlcatalog refid="dita.catalog"/>
        </xslt>
    </target>
    

    <target name="dita.out.map.xhtml.toc"
            unless="noMap" if="inner.transform"
            description="Build HTML TOC file,which will adjust the directory">
        <xslt processor="trax"
              basedir="${dita.temp.dir}"
              destdir="${output.dir}"
              includesfile="${dita.temp.dir}${file.separator}${user.input.file.listfile}"
              classpathref="dost.class.path"
              style="${dita.script.dir}${file.separator}map2xhtmtoc.xsl">
        	<excludesfile name="${dita.temp.dir}${file.separator}${resourceonlyfile}" if="resourceonlyfile"/>
            <param name="DITAEXT" expression="${dita.ext}" if="dita.ext" />
            <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" xmlns:dita="http://dita-ot.sourceforge.net"/>
            <mapper type="glob"
                    from="${user.input.file}"
                    to="${args.xhtml.toc}${out.ext}" />
          <xmlcatalog refid="dita.catalog"/>
        </xslt>
    </target>
</project>
