ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Namespace support in ant 1.6
Date Tue, 11 Nov 2003 09:52:20 GMT
On Mon, 10 Nov 2003, peter reilly <> wrote:

> I would like to get some movement on the outstanding issues
> if ant 1.6.

This is appreciated a lot by me.  Thanks for going ahead, I appologize
for letting the ball drop - I've been too busy with real-life and
real-life work.

> One of the outstanding issues is what namespace to use
> for nested elements of tasks.

Yep, the other one AFAICT is macrodef and I'll try to get the ball
rolling for this in a separate thread (unless you beat me).

> (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.

My take is that we should go with maximum XML tool support here.
Assume an Ant library ships with an XML Schema definition of the
tasks/types it contains - to make this work, nested elements that
belong to an antlib will have to be prefixed by the namespace of the

The default namespace belongs to whatever is the default namespace of
the document (or the element if you locally define a default
namespace).  So in addition to (b) from your choices (which gets my
vote), default namespace doesn't implicitly mean Ant core either -
only if Ant core is associated with the local default namespace.

> Choice b)
> <antcontrib:if>
>    <antcontrib:or>
>       <antcontrib:equals arg1="a" arg2="${x}"/>
>       <antcontrib:ispropertytrue property="y"/>
>    </antcontrib:or>
>    <antcontrib:then>
>       <echo>both conditions are true</echo>
>    </antcontrib:then>
> </antcontrib:if>

could be simplified via

<antcontrib:if xmlns:antcore="" xmlns="net.sf.antcontrib">
      <equals arg1="a" arg2="${x}"/>
      <ispropertytrue property="y"/>
      <antcore:echo>both conditions are true</antcore:echo>


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message