Let's not reinvent the wheel here.

The solution for names conflicts is namespaces - not rewriting. 

If we use a prefix, let's stick with what everyone else is using. Inventing
some "original" solution ( that may or may not be easier or more flexible 
than the W3C solution ) won't make things better for the user. 

<antlib location="antcontrib.jar" prefix="myxyz-" />
  <myxyx-if ...>

is not easier than 

<project xmlns:myxyz="ant:net.sf.antcontrib" >
  <myxyz:if ... >



Costin


Jose Alberto Fernandez wrote:

> Hi guys,
> 
> I was away on vacation so hasn't been around to make comments about the
> entire discussion. I will try to sumarize here some comments that go
> across several messages I have read today.
> 
> The current <antlib> provides a way for the user of a particular antlib to
> rename one or more elements that are in conflict with elements of some
> other antlib it tries to use. As the renaming is local to the project
> there is no problem; it is up to the user of the antlib to decide what
> names to use to refer to the loaded things. For example I may use the
> <foreach> class of antcontrib but for reasons of my project being in need
> to also use a <foreach> defined by some other third party which works
> diferently. So I could just load it and rename it lets say to <forall> and
> use it in my project using that name.
>  It is up to me as the user of the antlib.
> 
> From the discussion this last few days I like the idea from (I think)
> Peter/Nicola of having short and long names where the long names are form
> by adding a prefix defined not by the antlib writer, but by the antlib
> user:
> 
> <antlib location="antcontrib.jar" prefix="myxyz-" />
> 
> which would allowme to use either:
> 
> <if/> or <myxyz-if>
> 
> it is upto the user to decide what to use. Of course the same would be for
> the tasks (i.e., <taskdef>) that allows loading individual tasks into
> roles. The same rules of collisions and conflict resolution apply.
> 
> The important point is for the user (which is the one who has to
> deal with name clashes) to have control of the final naming scheme used in
> his/her buildfile. And we are not impossing any wierd semantics or making
> assumptions, if I decide to use the same prefix for two antlibs it is up
> to me to make sure there are no conflicts.
> 
> 
> 
>> -----Original Message-----
>> From: Stefan Bodewig [mailto:[EMAIL PROTECTED]
>> Sent: 02 May 2003 14:35
>> To: [EMAIL PROTECTED]
>> Subject: Re: Roles (was: antlib)
>> 
>> 
>> On Wed, 30 Apr 2003, Jose Alberto Fernandez
>> <[EMAIL PROTECTED]> wrote:
>> 
>> > The problem you are overlooking is the case of <weblogic> element
>> > in <ejbjar>, <jspc>, <serverdeploy>, etc.
>> 
>> Maybe not really overlooking but understimating.
>> 
>> The alternative would be to use <weblogicjspc> and <weblogicdeploy>
>> for the different interfaces.  If they come from different antlibs, we
>> really should use XML namespaces to resolve this.
>> 
>> But I now understand that having a table per interface may be
>> convenient (though not strictly necessary).
>> 
>> Stefan
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>> 
>>


Reply via email to