Re: inline use of antlib with namespace?

Stefan Bodewig <[email protected]> Mon, 21 Sep 2020 18:58:30 +0200
Newsgroups gmane.comp.jakarta.ant.user
Message-ID <[email protected]>
On 2020-09-21, Alan Snyder wrote:

> If I have to include the xmlns attribute at each use of a task from the library, then this is not what I want.

Then either I don't understand what you want or you want something that
is not possible with XML namespaces :-)

XML namespaces care for URIs, not for prefixes. You define mappings
between prefixes and URIs via xmlns:prefix. The mappings are inherited
from an element to all nested elements, but you can not define a mapping
in an element and expect it to be applied to a sibling element.

This is all handeled by the XML parser and Ant doesn't change that in
any way - it just is told which URI a certain element name is part of
and uses that to find the task.

Stefan