Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cme-dev] Thoughts on rearchitecting the Ant loader (and other XML-artifact loaders)

Stan,

You are completely accurate, the Ant loader started out being DOM based, 
but was then switched to be SAX based, in order to get line number 
information. Also it does to some extent simulate a DOM parser, rather 
than being purely event driven - as Bill suggests that might well be a 
better longer term implementation.

Ant targets are externally addressable by name, but nothing below that 
level is. A top-down parser-based  approach does seem the most natural. 

I don't believe the performance of the Ant loader is an issue, for the 
reasons you give. If you think it might be for other XML-based languages, 
I think we should pick one or more such language, and consider that 
instead of the Ant case, in case other characteristics of that other 
language have particular performance implications.

Regards,

Matt

cme-dev-admin@xxxxxxxxxxx wrote on 02/11/2004 23:51:03:
> Bill, 
> 
> Thanks for the response.  (Peri assured me that you would have 
> something to say on this topic.)  Regarding the Ant loader, Matt 
> would be the authority, and I should probably let him respond. 
> Nevertheless, I'll respond anyway :-) 
> 
> I think the current Ant loader may be somewhere between the DOM 
> approach and the SAX approach you used.  Looking through the code, I
> get the impression that it started as a DOM parser but then migrated
> to a SAX parse.  There are references to DOM but they've been 
> commented out.  The XMLNode class, which used to wrap a DOM node, 
> now just stores the information it needs directly and doesn't use a 
> DOM node.  The XMLLoader used to call a DOM parser utility and now 
> calls a SAX parser utility.  However, as I read it (and here my lack
> of experience may be showing), the SAX parser is used to create an 
> intermediate representation (an XMLNode tree rather than a DOMNode 
> tree?) that is then traversed to construct the concern model--this 
> sounds different from what you describe. 
> 
> Matt, I hope I haven't misrepresented your work (or misrepresented 
> it too badly).  As I said before, for all I know the performance of 
> the Ant loader may be perfectly acceptable given the relative size 
> and numbers of Ant files we expect to encounter.  But there are the 
> other XML-based languages to worry about ... 
> 
> Stan 
> 



Back to the top