ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From peter reilly <>
Subject Re: Ant 1.6 and namespace
Date Tue, 18 Nov 2003 15:18:03 GMT
On Tuesday 18 November 2003 14:27, Christopher Lenz wrote:
> peter reilly wrote:
> > On Monday 17 November 2003 17:20, Dominique Devienne wrote:
> >>Slightly related, if I extracted or wrote a schema for Ant,
> >>and specified an xsi:schemaLocation attribute in <project>,
> >>will Ant ignore the attribute, or barf?
> >
> > If the class did not contain a setSchemaLocation() method or
> > was an instance of DynamicConfigurable it would barf.
> Well, Ant should check namespaces on attributes. I'm not sure whether
> you've committed a related change already, but anywhere here's my
> proposal for a simple rule:
> If the attribute has no namespace (not to be confused with it being in
> the default namespace), or the namespace URI of the attribute matches
> the namespace URI of the containing element, Ant uses the attribute to
> configure the underlying object (via introspection or
> DynamicConfigurator). Otherwise, the attribute should be ignored (or
> possibly handled specially, like maybe the 'ant-type' attribute).

Yep, this is the way I intended to handle the attributes.

> > My original namespace support only allowed "antlib:*" to
> > be used for typedef's uri attribute (and hence antlib), all
> > other namespace uri's were ignored - see for example:
> >
> Such an artificial limitation does not make sense to me, and also
> doesn't seem to help with the problem at hand, AFAICT. The "antlib:" URI
> scheme has one main feature IIUC, namely the autodiscovery of antlibs
> based on the package name. This feature is orthogonal to the namespace
> URIs used for antlibs manually defined using <typedef>.
> All namespace URIs not actually mapped to an antlib, either by the
> "antlib:" scheme or by an explicit <typedef>, should be ignored

This is difficult as the the uri attribute of a typedef is handled at
run-time and ns handling is done at parse time, hence my initial

> (or
> handled as text -- not sure what the current implementation does).

The current implementation will whine.


> That
> decision should not involve the actual value of the namespace URI though.
> > We could modify namespace processing to ignore attributes not in the
> > "right" namespace.
> See above.
> -chris

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

View raw message