Thank you for your reply, but it answered a question I didn't ask. I want to 
know what element can be the parent of a <macrodef>, not which elements a 
<macrodef> can contain. Let me list some examples:

Is a <macrodef> a child of <target>?
Is a <macrodef> a child of <project>?
Is a <macrodef> the child of some other element?
-- 
Charles Knell
[EMAIL PROTECTED] - email



-----Original Message-----
From:     Grant Lewis <[EMAIL PROTECTED]>
Sent:     Fri, 12 May 2006 19:16:38 -0400
To:       Ant Users List <[email protected]>
Subject:  Re: Iterate over "filelist" with java task?

A macrodef can pretty much include any other ant task between its
sequential tag.  Below is an example from the docs showing the macro
definition and a call to the macro. Pay close attention to the
<some-tasks/> tag and replace it with a tag named <some-files/> and you
get the general idea of a macro. When the macro is executed, the tags
between the sequential tags are executed and the elements in the macro
are replaced with the content between those tags when you call the
macro, enabling you to use different file sets, for example, when
executing a block of tags.

Grant

<macrodef name="testing">
   <attribute name="v" default="NOT SET"/>
   <element name="some-tasks" optional="yes"/>
   <sequential>
      <echo>v is @{v}</echo>
      <some-tasks/>
   </sequential>
</macrodef>

<testing v="This is v">
   <some-tasks>
      <echo>this is a test</echo>
   </some-tasks>
</testing>



[EMAIL PROTECTED] wrote:
> Thanks, I am using 1.6.5. I'v checked the docs but there's something missing. 
> What is/are the parent element/s of the <macrodef> and the resulting task?

---------------------------------------------------------------------
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]

Reply via email to