ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Donald <>
Subject RE: [VOTE] procedural versus purely declarative
Date Mon, 23 Apr 2001 23:14:55 GMT
At 08:04  23/4/01 +0100, Jose Alberto Fernandez wrote:
>The AutoConfig style of doing things which is what I think of when you talk
>about XSLT is only for static expansions. How do you do when the expansion
>is dynamic (i.le., it depends on the result of the execution of other ANT
>tasks. How does XSL knows what to expand if it has not been generated yet?

Just like you can't directly translate make into imake or make into ant you
will not be able to translate things directly into the template language. I
put it to you that anytime that you *need* expansion of ant values in a
static template you have done something wrong ;)

>> >Humm, by this reasoning, we could remove fileset wild
>> characters since we
>> >can achieved the same thing using templates ;-)
>> Exactly ! But thats gonna have to wait a bit longer till we
>> have a decent
>> autoconf like tool about ;) Currently one of the reasons ant fails for
>> large projects is because it doesn't have this. Luckily it
>> makes up for it
>> with a low execution time and lots of in-JVM stuff.
>So, how do you say in XSLT "find all files with extension .java in a
>directory stored in a ${property}"? Is it as simple as:
>	<fileset dir="${property}" includes="**/*.java" />

who saids it can not be done like? XSLT unadorned can not access the
outside environment (it only transforms). We would need add some form of
extention elements to xslt.

This functionality is a long way off anyways so there is little use in
talking about iut now.

>The question is not: how complex/simple should be the template mechanism for
>ANT? but: Is a template mechanism the best way to provide what ANT needs?
>I am not sure, the answers to the second question is "yes".
>There are other ways to provide iteration over tasks or targets.
>Do not get me wrong, I see room for templates in order to apply preferences
>(eliminate magic proparties), or defining new tasks based on existing ones
>(a la macro ;P ), but it is not a panacea.

It is not meant to be a panacea - it is meant to be a solution to static
templating needs. You seem to indicate that there is a need for dynamic
templating - I used to think that until someone wrote to the list saying
something roughly like "you are all stupid, dynamic templates are evil for
reasons x, y and z". I agreed with them and no one has provided any valid
reason why dynamic templating should be used.



| "Faced with the choice between changing one's mind, |
| and proving that there is no need to do so - almost |
| everyone gets busy on the proof."                   |
|              - John Kenneth Galbraith               |

View raw message