ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jose Alberto Fernandez" <jalbe...@cellectivity.com>
Subject RE: Roles (was: antlib)
Date Thu, 08 May 2003 13:08:58 GMT
> From: Costin Manolache [mailto:cmanolache@yahoo.com]
> 
> Jose Alberto Fernandez wrote:
> 
> > 
> > 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. 
> 

Contin please, I have not mentioned in the discussion about NS usage
that we should use renaming. I did mention that that is what the
<antlib> does today. (Which is the only thing it could do given the fact
that when it was written there was no NS support).

This discussion is about how we use NS, if we use it, and my position is
that there is no reason to force people on using specific NS's for each
library they load, and that it should be upto the user to decide which
set of libraries to load on which NS. If I waht to load everything in
the default library and there is no conflict I should be able to; if
I want to put everyone on a different NS, then I could do that too.
It should be upto the user.

> 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.
> 
> 

I have not proposed renaming for a solution that uses NS, which I have
been willing to consider. In any case, with <taskdef/> there is no way
for you to stop me from renaming task, today. (not that I am advocating it).

> 
> > 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.  
> 
> 

Doesn't anybody think that this is ugly? To have to maintain two different
mechanisms that produce two completely different ways of writing
buildfiles. When you can have a unified approach that cover the whole
spectrum. I was hopping that <taskdef> will allow in the future to
declare things on a separate namespace, just as <antlib> would.

> 
> >> <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.
> 

Is there a DTD for XSLT? Can I validate an XSLT template against a DTD?
I thought that was not possible given that most of the elements in the 
template wil be the things I am trying to generate. In the case of XSLT
the the URI is really for the XSLT processor, but not XML as such.

> 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. 

Dynamically linked libraries exist in many programming languages
not only java, and how do you refer to them inside your code
whether you use some alias or something ingrane in the library
itself depends on how the linking process and library loader
system works for that language. Java does not have a monopoly on how to do this.

> 
> 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.
>  

Java packages are global. NS spaces are hyerarchical I can change the 
meaning of "ANT:" twenty times inside the same buildfile depending
on where I make the xmlns declaration. I can have "A:" and "B:" mean
the same thing or different things in diferent parts of the
same file. It is not a simple concept, actually I think it is quite
complicated in general.

Jose Alberto

Mime
View raw message