ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wannheden, Knut" <>
Subject RE: Antlib... when?
Date Mon, 06 Jan 2003 09:11:55 GMT
Just a few comments...

> From: Costin Manolache []
> I think we should agree on some basic issues:
> 1. If a namespace will be used to resolve conflicts - it will be XML 
> namespace ( i.e. we won't invent our own ).
> 2. Existing files will not have to change. ( i.e. the default 
> namespace
> will be used for the core tasks ).

Wouldn't it be a good idea to introduce a namespace for the core tasks and
make the default namespace deprecated.  Old buildfiles would still be valid,
but the preferred syntax would be with an Ant core namespace.  Maybe like

<project xmlns="antlib:org.apache.ant.core">

The only difference would be that <project/> would declare the default

A question:  How should namespaces and nested elements be handled?  Let's
say I write my own antlib (package with a task <bar/>.  Then my
buildfile would contain something like:
    <antlib name=""/>
    <foo:bar xmlns:foo=""/>

If I now want to extend the task to use nested elements, in what namespace
would they be and how would this affect the setXXX() interface of the task?
I suppose the options are to use the default namespace or the same namespace
as the task.  So either:

    <foo:bar xmlns:foo="">


    <foo:bar xmlns:foo="">

I suppose the second choice would be nice to have because then it would be
quite clear what is meant by a nested <fileset/> element (which is declared
in the core antlib).


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