Is your motivation being able to have conditionals in disguise, i.e.
be able to write

<run-macro name="${do-this}" />

? Otherwise I can't see the use for this. Just curious ;-) Thanks, --DD

On 6/6/06, Wolfgang Häfelinger <[EMAIL PROTECTED]> wrote:
Hi,

I wonder how  to  implement a task (in Java) allowing me to execute
a macro. I tried to understand how it works looking into Ant's source
code, but I'm bit lost. Would be kind if someone could give me a
"roadmap" how to do it ..

What I'm looking for is something like ..

Assume I have a macro:

<macrodef name="x">
 <attribute name="a" default="hello" />
 ..
 </macrodef>

Then I want to be able to say

  <run-macro name="x" />

instead of

 <x/>

For the beginning I'm happy to call a macro without any parameters like
shown. Even better would be to be able to provide parameters as well:

 <run-macro name="x" a="hello, world" />    <!-- utopia -->

 <run-macro name="x">
  <param name="a" value="hello, world" />
 </run-macro>

Any hints?

Cheers,
Wolfgang.


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