ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From David Weller <>
Subject Re: Nested property expansion...
Date Tue, 08 Aug 2000 15:53:39 GMT
>  DW> Why is it not possible to recursively expand names within the XML
>  DW> buildfiles?
> because you can't 8^).
> When Ant encounters a ${xyz} construct it looks up a property of the
> name xyz. It doesn't even try to see whether xyz holds ${} which could
> be translated again. 
> And I really don't think I'd like to add it, there should always be a
> cleaner way to achieve the same result - a way that'd be far more
> readable. What would you really want to do with it? Do you have a real
> example?

Sorry about bringing this one up again, but here's a non-real example, but a
very real reason (IMHO):  If I can set a value in Ant, I should also be able to
use it or view it.  Therefore, line two below...
1  <property name="fq_prop" value="${prop.outer}.${prop.inner}"/>
2  <property name="${fq_prop}" value=""/>
3  <echo message="So we are setting ${fq_prop} equal to ${${fq_prop}}"/>

...shouldn't even be "legal" Ant, should it?  

I mean, I could never _use_ that name in my buildfile to ever meaningfully
resolve to "", right?

I think that the property task shouldn't permit expansion inside the "name"
attribute if this is the case.

Do You Yahoo!?
Kick off your party with Yahoo! Invites.

View raw message