ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Steve Loughran <steve_lough...@hpl.hp.com>
Subject Re: task namespaces
Date Mon, 12 Sep 2005 11:48:41 GMT
Peter Reilly wrote:
> To allow easy use, the nested elements caused by java reflection on
> objects are placed in two namespaces - the default ant namespace (antlib:
> org.apache.tools.ant)
> and the namespace of the object that holds the nested element.
> 
> For example, the if task from ant-contrib extends ConditionBase, so
> it has nested elements like - equals.
> 
> The rules above allow the following:
> 
> <ac:if xmlns:ac="antlib:net.sf.antcontrib>
> <ac:and>
> <equals arg1="a" arg2="${p1}"/>
> <ac:equals arg1="b" arg2="${p2}"/>
> </ac:and>
> <then>
> <echo>the args are equal</echo>
> </then>
> <ac:else>
> <echo>They are not equal</echo>
> </ac:else>
> </ac:if>
> 
> 

aah, now it makes sense. I wondered why the behaviour was not consistent 
with my normal misunderstanding of xmlns, it  was doing the right thing, 
but I didnt see why.


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


Mime
View raw message