ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fergus Gallagher <Fergus.Gallag...@OrbisUK.com>
Subject Re: repeating Filters
Date Thu, 17 Feb 2000 11:35:39 GMT
Thanks for looking at this.

A related issue is the evaluation properties.  Unlike filters,
properties are evaluated at runtime so that 

	<property name="test" value="hello"/>
	<echo message="${test}"/>
	<property name="test" value="goodbye"/>
	<echo message="${test}"/>

produces hello-goodbye.

A logical extension of this might be

	<property name="test" value="hello"/>
	<property name="test1" value="${test}hello"/>
	<echo message="${test1}"/>
	<property name="test" value="goodbye"/>
	<echo message="${test1}"/>

which prints hellohello twice, not hellogoodbye the second time.  If it
were possible to evaluate ${test1} dynamically, I could see this as
being useful, for changing the "root" of an install, for example.

Obviously this is only a thought for sometime down the road when you're
bored with nothing to do :-)

Fergus

Stefano Mazzocchi wrote:
> 
> Fergus Gallagher wrote:
> 
> > I had been hoping to use a filter (for use with copydir) with the same
> > filter name local to a particular target.
> 
> >     <target name="A">
> >       <filter token="myToken" value="VALUE_A"/>
> >     </target>
> >     <target name="B">
> >       <filter token="myToken" value="VALUE_B"/>
> >     </target>
> 
> > But it seems <filter> is a global setting, set at parse time.  I used to
> > use <KeySubst> but this has been deprecated.
> 
> > Anyone got a solution?
> 
> I agree that filters should have a scope that is not always global, so
> for other things like properties and such.
> 
> The problem lays in the project DTD. Sam, are we able to create more
> structured DTDs?
> 
> Now there are two classes of tasks:
> 
>  - tasks that perform an action
>  - tasks that set project/target status (property, filter, available)
> 
> shouldn't we write different interfaces for the two?
> 
> should we allow to mix the two in the DTD?
> 
> comments?
> 
> --
> Stefano Mazzocchi      One must still have chaos in oneself to be
>                           able to give birth to a dancing star.
> <stefano@apache.org>                             Friedrich Nietzsche
> --------------------------------------------------------------------
>  Come to the first official Apache Software Foundation Conference!
> ------------------------- http://ApacheCon.Com ---------------------

-- 
Fergus Gallagher          Tel: +44 (20) 89 87 07 17
Orbis                     Fax: +44 (20) 87 42 26 49
The Swan Centre           email: Fergus.Gallagher@orbisuk.com
Fishers Lane              Web: http://www.orbisuk.com
London W4 1RX / UK

Mime
View raw message