DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29153>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29153

macro with element parameter can't call another macro with element parm of same 
name

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID



------- Additional Comments From [EMAIL PROTECTED]  2004-05-24 08:08 -------
The macro expands the contents of the nested element.
(It is a macro after all!)
Your original macro definitions are correct, however
you need to call <macro2/> as follows:

<macro2>
   <files>
      <files>
         <fileset dir="." includes="*.xml"/>
      </files>
   </files>
</macro2>

not nice but logical.
This can be seen if macro2 did not use the name "files" for the
nested element, by for example "files2":

<macro2>
   <files2>
      <files>
         <fileset dir="." includes="*.xml"/>
      </files>
   </files2>
</macro2>

This should be avoided when/if bug 25633 is implemented.
(In which case, one can to
<macrodef name="macro1">
  <element name="files"> implicit="yes">
  <sequential>
     <pathconvert property="foo" pathsep=":">
        <path>
          <files/>
        </path>
      </pathconvert>
      <echo message="${foo}"/>
   </sequential>
</macrodef>

<macro1>
   <fileset dir="." includes="*.xml"/>
</macro1>

I am marking this bug as INVALID, as it is by design, although
it is a bit counter intutative.

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

Reply via email to