Use a <foreach /> line if you are dealing with a file. You can specify an
arbitrary number of matches on a line by the delim string; I do believe. You
can also nest the <foreach> if that doesn't work. If you are good with
regular expressions[1] you could split up the line that way. There are
really endless suggestions. You can also write a custom <script> to do it.

<foreach item="Line" in="touples.csv" delim="," property="x,y,z">
    <echo message="Read touple ${x}.${y}=${z}" />
</foreach>

1.] http://nant.sourceforge.net/nightly/help/tasks/regex.html

----- Original Message ----- 
From: "Curtis Zarger" <[EMAIL PROTECTED]>
To: "'Scott Hernandez'" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
Cc: "Curtis Zarger" <[EMAIL PROTECTED]>
Sent: Monday, May 10, 2004 11:52 AM
Subject: RE: [Nant-users] calling a task multiple times


> Scott,
>
> THX for the reply.  I've tried the foreach task.  My problem there is that
> the 'property' attribute only handles 2 values (ie name-value pair).  I
need
> 4.
>
> What I am trying to do is make configuration changes, via edits to XML
> files.  To do that requires 4 values (file name, element name, attribute
> name, attribute value).  The foreach capability to read lines from a file
> works great, but only supports two values, .... or multiple values of a
> single property as in your example.
>
> My example 'lines' in a file might look like this:
>
> Web.config,compilation,debug.false
> Machine.config,compilation,batch,true
>
> This would define two separate XML file edits.
>
> Any thoughts?  I am unfamiliar with what you call the 'functions stuff in
> the nightly builds'.  Can you point me to that?



-------------------------------------------------------
This SF.Net email is sponsored by Sleepycat Software
Learn developer strategies Cisco, Motorola, Ericsson & Lucent use to deliver
higher performing products faster, at low TCO.
http://www.sleepycat.com/telcomwpreg.php?From=osdnemail3
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to