You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Ja...@rzf.fin-nrw.de on 2004/07/21 08:57:54 UTC

AW: Question: How to add nested elements dynamically into an Ant task.

According to the xml spec nested tags (elements) can occur multiple times.
Therefore in Ant this is handled via addXXX(...) methods which usually store
the given element in a list. Then during execution that list is evaluated.

Only a few tasks regret mutliple occurances of nested elements. 
Havent tested it, but I think <macrodef> supports only one nested
<sequential>.

The tutorial could help here
http://ant.apache.org/manual/tutorial-writing-tasks.html#NestedElements


Jan


> -----Ursprüngliche Nachricht-----
> Von: Nanda Kishore MVS [mailto:nandakishoremvs@renaissance-it.com]
> Gesendet am: Mittwoch, 21. Juli 2004 08:51
> An: user@ant.apache.org
> Betreff: Question: How to add nested elements dynamically into an Ant
> task.
> 
> Hi,
> 	For a task that takes nested elements, how can I add 
> nested elements determined dynamically at runtime? 
> Specifically, I am using the <csc> task which takes nested 
> <resource> elements. And I don't know in advance how many 
> <resource> elements will have to be used. How can I add these 
> elements determined at runtime dynamically?
> Any help greatly appreciated.
> 
> Thanks & Regards,
> Nandakishore 
> 
>