On Mon, 10 Nov 2003, peter reilly <[EMAIL PROTECTED]> 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
antlib.

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="org.apache.tools.ant" xmlns="net.sf.antcontrib">
   <or>
      <equals arg1="a" arg2="${x}"/>
      <ispropertytrue property="y"/>
   </or>
   <then>
      <antcore:echo>both conditions are true</antcore:echo>
   </then>
</antcontrib:if>

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to