<?xml version="1.0"?> <project name="xslt-test" basedir="." default="nothing"> <property name="out.dir" value="out"/> <target name="setup"> </target> <target name="teardown"> <delete dir="${out.dir}" failonerror="false" /> </target> <target name="testStyleIsSet"> <xslt in="data.xml" out="${out.dir}/out.xml"/> </target> <target name="testTransferParameterSet"> <property name="value" value="myvalue"/> <xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> <param name="set" expression="${value}"/> </xslt> </target> <target name="testTransferParameterEmpty"> <property name="value" value=""/> <xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> <param name="empty" expression="${value}"/> </xslt> </target> <target name="testTransferParameterUnset"> <xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> <param name="undefined" expression="${value}"/> </xslt> </target> <target name="testTransferParameterUnsetWithIf"> <xslt in="data.xml" out="${out.dir}/out.xml" style="printParams.xsl"> <param name="undefined" expression="${value}" if="value" /> </xslt> </target> <target name="testDefaultMapper"> <property name="value" value="myvalue"/> <xslt style="printParams.xsl" destDir="${out.dir}" basedir="."> <param name="set" expression="${value}"/> </xslt> </target> <target name="testCustomMapper"> <property name="value" value="myvalue"/> <xslt style="printParams.xsl" destDir="${out.dir}" basedir="."> <param name="set" expression="${value}"/> <mapper type="glob" from="data.*" to="out.*"/> </xslt> </target> <target name="testTypedMapper"> <property name="value" value="myvalue"/> <xslt style="printParams.xsl" destDir="${out.dir}" basedir="."> <param name="set" expression="${value}"/> <globmapper from="data.*" to="out.*"/> </xslt> </target> <target name="testExplicitFileset"> <property name="value" value="myvalue"/> <xslt style="printParams.xsl" destDir="${out.dir}" useImplicitFileset="false" basedir=".."> <param name="set" expression="${value}"/> <fileset dir="."/> </xslt> </target> <target name="testNewerStylesheet"> <antcall target="copyXsl"> <param name="xsl.value" value="old-value"/> </antcall> <xslt in="data.xml" out="${out.dir}/out.xml" style="tmp.xsl"/> <antcall target="copyXsl"> <param name="xsl.value" value="new-value"/> </antcall> <xslt in="data.xml" out="${out.dir}/out.xml" style="tmp.xsl"/> <delete file="tmp.xsl"/> </target> <target name="testDirectoryHierarchyWithDirMatching"> <mkdir dir="${out.dir}/src/level1/"/> <copy file="data.xml" todir="${out.dir}/src/level1/"/> <xslt basedir="${out.dir}/src" destdir="${out.dir}/dest" style="printParams.xsl"/> </target> <target name="testDirsWithSpaces"> <mkdir dir="${out.dir}/s rc/"/> <copy file="data.xml" todir="${out.dir}/s rc/"/> <xslt basedir="${out.dir}/s rc" destdir="${out.dir}/d est" style="printParams.xsl"/> </target> <target name="copyXsl" if="xsl.value"> <copy file="testNewerStylesheet.xsl" tofile="tmp.xsl" overwrite="true"> <filterchain><expandproperties/></filterchain> </copy> </target> </project>