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

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:
http://marc.theaimsgroup.com/?l=ant-dev&m=105336417419712&w=2

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 (or handled as text -- not sure what the current implementation does). 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

--
Christopher Lenz
/=/ cmlenz at gmx.de


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to