ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Fuller <jim.ful...@ruminate.co.uk>
Subject Re: AW: Converting new or changed files with an batch file called from within ant
Date Tue, 12 Apr 2005 14:18:10 GMT
Huditsch Roman wrote:

>Hi Jim,
>
>Thanks a lot for your solution.
>I'll straigth dive into it tomorrow morning.
>Thanks!
>
>  
>

a few caveats...u have to download ant-contribs jar and make it
available to Ant (usually this means putting it in ant's lib...though I
would suggest putting into a seperate directory and nesting a
<classpath/> to the <taskdef/>)

this is not tested...though should give you the gist.....

if you find yourself going the file by file route you could use
ant-contribs <for/> task to iterate over a <fileset/>

<for param="file">
  <path>
    <fileset dir="xml" includes="*.xml"/>
  </path>
  <sequential>
	<transform src="@{file}" dest="dest_dir" style="somestylesheet.xsl"/>
  </sequential>
</for>

note the src would refer to the single file e.g. @{file} (as being itereated through defined
by the <fileset/>)

gl, Jim Fuller



---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message