ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <peter.rei...@corvil.com>
Subject Re: AW: Namespace support in ant 1.6
Date Tue, 11 Nov 2003 09:14:39 GMT
On Tuesday 11 November 2003 08:57, Antoine Levy-Lambert wrote:
> >Von: peter reilly [mailto:peter.reilly@corvil.com]
> >Gesendet: Montag, 10. November 2003 19:21
> >An: Ant Developers List
> >Betreff: Namespace support in ant 1.6
> >
> >
> >Hi,
> >I would like to get some movement on the outstanding issues
> >of ant 1.6.
>
> +1
>
> >One of the outstanding issues is what namespace to use
> >for nested elements of tasks. (Discovered by introspection
> >rules).
> >
> >The choices are:
> >  a) Use the default ant namespace, this is the current rule.
> >  b) Use the namespace of the enclosing task or type.
> >  c) Allow either - let the build script author choose.
> >
> >Using the if task from ant-contrib and assuming an
> >project tag of <project xmlns:antcontrib="antlib:net.sf.antcontrib"
> >as an example:
>
> Do <or/> and <equals/> in your example come from ant core ? I guess so, but
> <then> comes from ant-contrib, no ?

The <or/> and <equals/> come from 
org.apache.tools.ant.taskdefs.condition.ConditionBase
which is extended by
net.sf.antcontrib.logic.IfTask,
thus, as seen by introspection, they come
from the IfTask class, hence the "antcontrib" prefix.

Of course, in ant1.7 when roles get sorted out,
<or/> and <equals/> will be taskdef'ed elements as well as hardcoded
methods of ConditionBase.

Peter

> I would have expected your examples a and  b to be like this :
>
> Choice a)
>
> <antcontrib:if>
>    <or>
>       <equals arg1="a" arg2="${x}"/>
>       <antcontrib:ispropertytrue property="y"/>
>    </or>
>    <antcontrib:then>
>       <echo>both conditions are true</echo>
>    </antcontrib:then>
> </antcontrib:if>
>
>
> Choice b)
>
> <antcontrib:if>
>    <antcore:or>
>       <equals arg1="a" arg2="${x}"/>
>       <antcontrib:ispropertytrue property="y"/>
>    </antcore:or>
>    <then>
>       <antcore:echo>both conditions are true</antcore:echo>
>    <then>
> </antcontrib:if>
>
>
> Cheers,
>
> Antoine
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message