ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: task namespaces
Date Mon, 12 Sep 2005 11:02:17 GMT
To allow easy use, the nested elements caused by java reflection on
objects are placed in two namespaces - the default ant namespace (antlib:
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>
<equals arg1="a" arg2="${p1}"/>
<ac:equals arg1="b" arg2="${p2}"/>
<echo>the args are equal</echo>
<echo>They are not equal</echo>

On 9/12/05, Steve Loughran <> wrote:
> I know separate namespace work is optional, but once you start on it it,
> it is more manageable. For this reason, the next edition of
> java-dev-with-ant will use namespaces everywhere too, except for the
> bits where I dont understand what is going on. Actually, I am slowly
> building up model. Nested stuff is the troublespot
> -declare task <mytask> in namespace n1:
> -declare type <mytest> extends Condition in namespace n1:
> If mytask has a nested element <action>, and it also supports multiple
> nested conditions, is this how it looks
> <n1:mytask>
> <action>this action is a direct element; default NS or local ns?</action>
> <http url="this-is-a-condition-from-Ant; default NS" />
> <n1:mytest>this is my new test, in the new ns</n1:mytest>
> </n1:mytask>
> What confuses me here is that the ns of a nested element (not a type, an
> element) is what? local? or Ant's main ns?
> -steve
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message