In the comments to an earlier article marcg said:

I discovered that the only way that I could namespace scriptdefs was to put them into an antlib.

When I mentioned this on the Ant dev-list, Peter Reilly responded:

The doc does not mention it, but inherits attributes from DefBase, so the following works:
    <scriptdef name="a" uri="a.b.c" language="beanshell">
      <attribute name="attr"/>
      self.log("Attribute attr1 = " + attributes.get("attr"));
    </scriptdef>
    <a xmlns="a.b.c" attr="b"/>

He actually meant AntlibDefinition, not DefBase. The uri attribute is supported by scriptdef, typedef, taskdef, macrodef and presetdef.

path: /en/Apache/Ant | #