ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <DDevie...@lgc.com>
Subject RE: top-level tasks, import, projecthelp, targetless
Date Tue, 23 Jul 2002 23:46:37 GMT
Nikola Ken already told me that actually, which just shows how ignorant I am
of SAX matters (among other things). I guess I find inserting a (DOM) tree
inside a (DOM) tree much simpler than the callback scheme of SAX, especially
when things start nesting... And the (DOM) tree approach allows to fully
parse the first level build file, therefore allows some sort of processing
to happen at that time, before going to the second level (included/imported
files). It's just me that finds this conceptually simpler. Also avoids
re-parsing when doing an <antcall>, although I suppose this can be achieved
differently. Sure, SAX is probably faster, but the DOM might make the code
simpler. --DD

-----Original Message-----
From: J.Pietschmann [mailto:j3322ptm@yahoo.de] 
Sent: Tuesday, July 23, 2002 6:38 PM
To: Ant Developers List
Subject: Re: top-level tasks, import, projecthelp, targetless

Dominique Devienne wrote:
> Just because of the way Ant 1.x mingles parsing and executing.... Would
> there be a full XML parsing, getting to the DOM or a DOM-like structure

Well, FOP does *not* generate a DOM before doing FOP specific
stuff, and most XSLT processors do neither. FOP creates an Java
object corresponding to a FO for an SAX startElement event, and
calls the end() method of that object for the endElement() event.
The element itself may make known itself to the parent in some
element specific way, thereby receiving data from the parent as
necessary, and usually does some other stuff like resolving sort
of static properties. For some objects, the end() method triggers
rendering the stuff accumulated so far, which may or may not
result in an actual rendering (the latter in case forward
references have still to be resolved).

The point is: it is not a matter of having a DOM or not, it
is a matter of a well designed and specified processing model.
Whether you implement this with SAX only, or a DOM, or a customized
more or less tree like data structure is a matter of performance
and maintainability only (ok, this is already enough for a bunch
of flame fests :-)

BTW I'd *like* to see a formal specification of how Ant processes
build files and executes what it is actually supposed to execute.

J.Pietschmann


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message