ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Costin Manolache <>
Subject RE: Roles (was: antlib)
Date Thu, 08 May 2003 02:35:08 GMT
Jose Alberto Fernandez wrote:

>> As someone already said, it's about "not reinventing the
>> wheel", not about
>> enabling the use of fancy tools.  But as ubiquitous and
>> accepted as XML
>> namespaces are, I see many things that could be gained from using
>> namespaces.  Also, I suspect most users familiar with XML
>> will have had some
>> dose of contact with namespaces.
> But ANT is not for experience XML users but for Java programmers
> or C or .NET (with the new tasks). ANT is popular because
> it is simple to use you do not have construccions that require
> you to read a full spec to understand. I am not against NS, but
> I am against forcing people to use them just because.

And you instead propose to use something as complex - but different.

Your "rewriting task names to resolve conflicts" is in no way better than
"use namespace to resolve conflicts". User of ant will be far better
learning the standard way to resolve conflicts than learning your 
syntax and rewriting. 

We do force people to use XML, and we force them to use a specific 
DTD ( <copy> ... ) and semantics. Even Perl forces people to use 
a certain syntax and rules. 

If you have a solution to the name conflict that is far better than using
the standard solution - then we can consider it. But renaming task names is 
certainly not.

> So again you have a two tier world where some things are more core
> than others. Me as a library provider need to decide now whether
> to ship my library with a property file so that it can be incorporated
> seemingly into ANT namespace or use an XML definition and force
> my users to learn NS. Hummmm

Yes. In the first case you'll need to be very carefull to avoid naming
conflicts, and you may not be able to benefit from some tools.

In the second - you'll force users to use NS - which is a standard used in
almost all XML specifications today. We already forced them to learn XML
in the first place, and learning NS won't be a waste of time.  

>> <project xmlns:cont="urn:uri-supplied-by-ant-user">
>> <antlib location="antcontrib.jar"
>> ns="urn:uri-supplied-by-ant-user"/>
>>          <cont:if/>
>> </project>
> I thing this is what I meant (in escense), with the understanding
> that:
> a) the user can use the same URI on several <antlib>s
> (any conflicts are his problem)

The namespace is _not_ under user control, at least according to W3C. 
You can't just use whatever URI you want for XSLT or XHTML - 
the URI of a specification/DTD is defined by that specification.

The equivalent of a namespace in a programming language is the 
package. What you are suggesting is equivalent in letting users 
pick whatever package they want for a java class, at runtime. 

BTW, if we are still talking about java programmers using ant - I doubt
we'll have that many users who don't understand how package work and 
have a big shock learning about XML namespaces.

View raw message