Hi Jim, Thanks a lot for your solution. I'll straigth dive into it tomorrow morning. Thanks!
wbr, Roman _______________________________________ Roman Huditsch IT and Electronic Publishing LexisNexis ARD Orac Marxergasse 25 1030 Vienna Austria ph: +43-1-534 52-1514 f: +43-1-534 52-140 e-mail [EMAIL PROTECTED] www.lexisnexis.at > -----Ursprüngliche Nachricht----- > Von: James Fuller [mailto:[EMAIL PROTECTED] > Gesendet: Dienstag, 12. April 2005 16:10 > An: Ant Users List > Betreff: Re: Converting new or changed files with an batch > file called from within ant > > > you could do something like > > <?xml version='1.0'?> > > <project name='transform' default='build' basedir="."> > > <taskdef resource="net/sf/antcontrib/antcontrib.properties"/> > > <property name="jar.saxon" location="/opt/saxon/saxon8.jar"/> > > > <macrodef name="transform"> > <attribute name="src"/> > <attribute name="dest"/> > <attribute name="style"/> > <sequential> > > <mkdir dir="@{dest}"/> > > <uptodate property="transform.notRequired"> > <srcfiles dir= "@{src}" includes="**/*.xml"/> > <mapper type="merge" to="@{dest}/**/*.html"/> > </uptodate> > > <if> > <equals arg1="${transform.notRequired}" arg2="true" /> > <then> > Transform not required > </then> > <else> > > <xslt in="@{src}" > out="@{dest}" > style="@{style}" > extension=".html" > includes="**.xml" > basedir="."> > > <outputproperty name="method" value="xml"/> > <outputproperty name="standalone" value="yes"/> > <outputproperty name="encoding" value="iso8859_1"/> > <outputproperty name="indent" value="yes"/> > > <classpath> > <pathelement location="${jar.saxon}"/> > </classpath> > </xslt> > > </else> > </if> > </sequential> > </macrodef> > > > <target name='build'> > <transform src="test" dest="webroot" style="xsl/index.xsl"/> > </target> > > </project> > > using ant-contrib's if task....once again u still only get > dir by dir checking, this could easily be customised to work > on a per file basis (then iterate using <for/> task)...though > as you can see things get more procedural.. > > gl, Jim Fuller > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] For > additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]