<?xml version="1.0" encoding="utf-8"?>
<project basedir="." default="dist" name="antodd">
<!--
	This library is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License as published by the Free Software Foundation; either
	version 2.1 of the License, or (at your option) any later version.
	
	This library is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
	Lesser General Public License for more details.
	
	You should have received a copy of the GNU Lesser General Public
	License along with this library; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
	
        Id: $Id: build-to.xml 9755 2011-11-15 09:07:52Z rahtz $
        Copyright: 2011, TEI Consortium<
-->
  <!--
    performs ODD processing.
 -->
  <!-- whether to make summary odd doc  -->
  <property name="summaryDoc" value="false"/>

  <property name="odd2oddxsl"      value="../odds2/odd2odd.xsl"/>
  <property name="odd2litexsl"     value="../odds2/odd2lite.xsl"/>

   <condition property="processODD">
    <equals arg1="${odd}" arg2="true"/>
  </condition>

  <target name="notodd" unless="processODD">
    <copy file="${inputFile}" tofile="${outputTempDir}/tmp2.xml" overwrite="true"/>
  </target>

  <target name="odd" if="processODD">
    <echo>Do ODD processing </echo>
    <xslt force="yes" style="${odd2oddxsl}" in="${inputFile}" out="${outputTempDir}/tmp1.xml" classpath="classpath">
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../catalog.xml"/>
          <pathelement location="../../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
      <factory name="net.sf.saxon.TransformerFactoryImpl"/>
      <classpath location="${oxygenlib}/saxon9ee.jar"/>
      <param name="lang" expression="${lang}" if="lang"/>
      <param name="defaultSource" expression="${defaultSource}" if="defaultSource"/>
      <param name="verbose" expression="${verbose}" if="verbose"/>
    </xslt>
    <xslt force="yes" style="${odd2litexsl}" in="${outputTempDir}/tmp1.xml" out="${outputTempDir}/tmp2.xml" classpath="classpath">
      <factory name="net.sf.saxon.TransformerFactoryImpl"/>
      <classpath location="${oxygenlib}/saxon9ee.jar"/>
      <xmlcatalog>
        <catalogpath>
          <pathelement location="../../../../catalog.xml"/>
          <pathelement location="../../../../../xhtml11/dtd/xhtmlcatalog.xml"/>
        </catalogpath>
      </xmlcatalog>
      <param name="summaryDoc" expression="${summaryDoc}" if="summaryDoc"/>
      <param name="displayMode" expression="rnc"/>
    </xslt>
  </target>

</project>