ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Roles (was: antlib)
Date Fri, 02 May 2003 09:05:40 GMT
On Wed, 30 Apr 2003, Costin Manolache <cmanolache@yahoo.com> wrote:
> Stefan Bodewig wrote:
>  
>> I don't see a need for separate namespaces depending on the
>> interfaces, so only using the child's element name (and namespace)
>> could be enough.  I'm not sure whether I'm overlooking a problem.
> 
> Not sure I understand.  Namespaces are not required to solve the
> polymorphism problem.

Me neither, two overloaded meanings for "namespace".  Let me try to
rephrase:

I don't see the need for a different mapping of names to classes
depending on the interface, one mapping should be enough.  This would
mean the child's element name (and XML namespace) should suffice and
we don't need the interface the child is expected to implement to
determine the class.

> My concern was the API used by ComponentHelper - I would rather 
> add the "parent" parameter, even if it's not used now, if we expect
> we'll find some use cases that will require it ( say in 1.7+ ).

OK.

>> An alternative to a magic namespace would be magic attribute names.
>> We can use attributes that contain dashes
>> 
>> <dependset>
>>   <zipfileset use-as="srcfileset">
>> </dependset>
>> 
>> use-as quite clearly states the user's intent and it is impossible
>> to have an existing attribute for tasks or nested elements.
> 
> Sounds good ( not "use-as", but magic attribute ). Maybe "ant:type"
> would be better ?

This introduces a magic attribute name and a magic namespace.  Works
for me.

> The attribute should be optional

Of course.

Stefan

Mime
View raw message