<project name="FOP-IT" default="build_all">

<!-- Define FOP Task -->
<property name="fop.dir" value="/homedir/ap/fop"/>
<taskdef name="fop" classname="org.apache.fop.tools.anttasks.Fop">
	<classpath>
       	<pathelement location="${fop.dir}/build/fop.jar"/>
        <pathelement location="${fop.dir}/lib/avalon-framework-cvs-20020806.jar"/>
        <pathelement location="${fop.dir}/lib/batik.jar"/>
    </classpath>
</taskdef>

<!-- Create an XSL:FO file and then generate a PDF  -->
<target name="create-fo">
	<!-- Transform one module and its lessons and topicsinto an xsl:fo file -->
	<xslt basedir="." destdir="."
		style="bard_to_fo.xsl" includes="**/*.ply.xml" force="true">
		<mapper type="glob" from="*.ply.xml" to="*.fo" />
	</xslt>
</target>

<target name="create-pdf" depends="create-fo" description="Generates a single PDF file">
	<fop format="application/pdf" outdir="." messagelevel="debug">
        <fileset dir=".">
           <include name="*.fo"/>
        </fileset>
	</fop>
</target>

<!-- === Create HTML Version === -->
<target name="create-html-play">
	<xslt basedir="." destdir="."
		style="bard_to_html.xsl" includes="**/*.ply.xml" force="true">
		<mapper type="glob" from="*.ply.xml" to="*.html" />
	</xslt>
</target>


<!-- === Build All === -->
<!-- Call all the other XSLT templates to create a complete list of products. -->

<target name="build_all" depends="create-pdf, create-html-play" description="Performs all the builds we want to create by default.">
</target>

</project>
