ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: Extensible Attributes
Date Fri, 15 Dec 2000 08:33:31 GMT
Peter Vogel <> wrote:

>> Peter Vogel <> wrote:
>> > 1.  Why be so strict about attributes on tags, such that you
>> > throw an exception for any unrecognized tag?
>> Because Ant doesn't expect to see anything that has meaning to
>> something else but not Ant in a build file.
> Again, my point is that you have here a lovely, extensible language
> that *can* be easily extended as needed by different organizations
> to support the build environment they need, yet you turn the
> build.xml file into a straightjacket by throwing a parse exception
> for no good reason.  To say that the reason ant doesn't like it is
> because ant doesn't like it is the most circular of arguments!

This is not what I wanted to say - Ant's design doesn't take into
account that somebody out there might want to extend the syntax of the
build file. I didn't even try to give a reason for that design, but
I'll try to do now:

If Ant ignored unknown elements and attributes, users would have a
very hard time tracking down typos and similar errors:

<copy forceoverwrite="true">

wouldn't be caught. <copydir> has a forceoverwrite, while <copy> has
an optional overwrite attribute - it is valid to not specify overwrite
at all - so the above would essentially become 

<copy overwrite="false">

and I think you could spend hours in tracking down the problem.

> Given that it is *trivial* to ignore attributes you don't
> understand, and that it *doesn't* damage the functionality of ant,
> and that it *does* enhance the functionality of environments built
> around ant, why limit yourself and every other potential user of
> ant?

Because it does damage the functionality of Ant - see above.

> Namespaces are nice, but since you aren't using SAX2 right now, you
> are putting off functionality that could be there *today* for some
> nebulous future.

It's less nebulous than you think. Ant2 will be using SAX2 and I'll
lobby for making it namespace aware. Personally I expect Ant 1.3 to be
released and big efforts put into Ant2 early next year - after we all
have recovered from holidays that is.


View raw message