Some more thoughts on namespaces... > > > I do not like the "type" attribute, type is already use on several > > places like <available> > > names ... > > This is where I'd really see a magical namespace for attributes that > get parsed by Ant's core. >
Then the whole thing would resemble XML Schema Instance very much, where you have an xsi:type attribute for pretty much the same purpose. Did you have something like this in mind? <dependset> <srcfileset ant:type="zipfileset" src="some.zip"/> </dependset> Here "ant:type" declares what type/task to use for the "srcfileset" role of <dependset/>. All other attributes (and nested elements) of the <srcfileset/> element get passed to the created <zipfileset/> instance. But this would introduce XML namespaces. I suppose that if antlib was to use namespaces (as has been discussed) at a later stage it would be no problem to extend this role mechanism to use them. E.g. <dependset> <srcfileset ant:type="my:foofileset"/> </dependset> would create a <foofileset/> instance of the antlib bound to the namespace associated with the "my" prefix. When used standalone (not as a role of some other task or type) it would be used with the same name: <my:foofileset id="foo.set"/> All this is just syntax of course. But I think that's an important aspect as well. Although currently most people seem to think that namespaces should be addressed at a later stage and separately of the role and antlib concepts. -- knut