In the ant-contrib manual is no example for the foreach task. Can
anybody give an example of how to iterate e.g. over all .xml files in a
folder structure.

I also could not find out how to get the path and name of the currently
iterated file.

What I need is something like: (pseudocode)

Foreach file of type **/*.xml in dir X do
  Store Property path = file + file_path
  
  Proccess file with xyz.xsl and store result in dir YXZ
End do


-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] 
Sent: Freitag, 26. November 2004 15:01
To: Ant Users List
Cc: Ant Users List
Subject: RE: Combine Apply + XSLT task


"Robert Soesemann" <[EMAIL PROTECTED]> wrote ..
> Thanks, that much better than apply. But I couldn't find out how to 
> extract and pass the path of the currently processed file.
> 

could try something like;


<project name="yourproject">

<fileset id="filedir" dir="."/>

<property name="filepath" refid="filedir"/>

<echo>${filepath}</echo>

</project>

you might have to process from here with a <foreach/> as well....

gl, Jim Fuller


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to