ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Simeon Fitch <>
Subject Re: Anteater... I'm Baaaack...
Date Mon, 18 Dec 2000 14:53:03 GMT

--- James Duncan Davidson <> wrote:
> On 12/14/00 8:27 PM, "James Cook" <> wrote:
> > If the only object to DOM is overhead then I think we have a topic for
> > discussion. As a developer, I have a few XML parsers (Xerces, Sun's
> parser
> > that is packaged with JAXP, JDOM) installed, and they all support DOM.
> I
> > think we have to remember that this is a developer tool. Why restrict
> its
> > simplicity and elegance by throwing out a perfectly acceptable library?
> I
> > don't understand the objection, especially when you look at Simeon's
> elegant
> > use of DOM in Antidote.
> DOM is a "document" object model which is generalized to work with a
> large
> number of abstract and anonymous nodes. Ant works with Projects which
> have
> very specified nodes of Targets, Tasks, Properties, etc. There is no need
> to
> use a generic library when what you are wanting to do is work with very
> specific type information. DOM doesn't preserve any of that type
> information, except as strings.

For what it's worth (and I know I've lost this battle), I have been able to
provide strongly typed Project, Target, Task and Property classes in
Antidote that mirror the ones in the Ant core, while at the same time
implementing the DOM interfaces. In otherwords I have a "docuement" object
model that also provides specific type information.

*Please* take a look at the classes in
jakarta-ant/src/antidote/org/apache/tools/ant/gui/acs. It's not perfect,
nor 100% appropriate for use in an Ant core, but I think that it proves
that you /can/ have the best of both worlds. And it only took me about 5
hours to implement this data model that is both strongly typed (in an Ant
sense)and implements DOM semantics. And there is no "overhead" that I've
noticed on my vintage class development box. 

The one really bad thing about it is that I rely on Sun's JAXP
implementation, which I'm sticking to until you guys settle on the data
model for Ant 2.0. I did this so I could focus on the more interesting
parts rather than futzing with XML parsing/data model generation that will
becode OBE/DOA for Ant 2.0. But I encourage a look as it does offer a
different perspective on data model building than has been presented so far
(I think).


Mustard Seed Software

Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.

View raw message