ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <>
Subject Re: Tasks, DataTypes and Factories
Date Thu, 07 Mar 2002 16:19:42 GMT
On Thu, 7 Mar 2002, Jose Alberto Fernandez wrote:

> > I'm not sugesting that ant should require namespaces, or get into the 
> > religious discussion about the meaning of a namespace. 
> > 
> > I'm just saying they are part of the xml standard, and
> > it's a good idea to design the task factory API with namespace
> > ( in the generic sense ) in mind. If it's going to be
> > a java-style package name or something else - it doesn't matter
> > from the point of view of the factory interface. 
> > 
> Doesn't NS require a well defined DTD or Schema for the NS declaration?
>     <xyz:tag ns:xyz="URI" ...>
>     </xyz:tag>
> How can ANT work that out? We do not have a well defined DTD at the moment.

Namespace have nothing to do with DTDs or schema ( except that it runs 
into the limitations of dtd :-). But we don't use DTDs, so no problem here.

It just says that ":" is reserved and should be used to separate the
local part from the prefix, and it defines the syntax to be used ( the 
ns: attribute, etc ).
It's obviously not the perfect standard, I'm sure we can invent something
better :-)

But this has little to do with ant - all tasks included in ant1.5 will
remain unchanged and do not need to use namespaces.

My proposal allow someone to hook in and use namespaces for his own
add-on tasks - the ProjectHelper allow the hook of a SAX2 
parser, and the ProjectComponentHelper interface allows to
pass the ns information ( if any ) in a decent way.

BTW, the ns param doesn't have to come from XML or be a XML namespace,
it's just a way to qualify the name of the task and avoid the 
flat namespaces or strange naming conventions for the tag names.


To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message