ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Koberg <...@koberg.com>
Subject Re: task namespaces
Date Mon, 12 Sep 2005 11:08:31 GMT
jfuller@ruminate.co.uk wrote:
> Phil Weighill Smith <phil.weighill-smith@volantis.com> wrote ..

> the only way those unprefixed elements are in some other namespace is if it is declared
at some encapsulating parent element.
> 
> for example;
> 
> <project xmlns="http://www.example.org/someanturi">
> 
> <n1:mytask>
> 
> <action/>
> <http/>
> 
> </n1:mytask>
> 
> </project>
> 
> otherwise, if an xmlns declaration does not exist those elements belong to n1:  namespace.

OK, now I am confused. I have not looked at or used namespaces in Ant 
yet, but this would seem to be a problem. Would there not need to be a 
default namespace, otherwise how would the XML parser know what to do? 
action and http in a default namespace would certainly have totally 
different meanings to an underlying app.

If you use namespaces, does ant require a default namespace. Does ant 
put a default namespace in behind the scenes?

In any case, it would be best to prefix elements that are in the same 
namespace with the appropriate namespace-prefix.

best,
-Rob


> 
> hth, Jim Fuller
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
> For additional commands, e-mail: dev-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message