abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James M Snell <jasn...@gmail.com>
Subject Re: Problems decoupling extensions from parser back end
Date Mon, 09 Oct 2006 17:15:17 GMT
This is definitely a difficult problem (which is why I completely punted
on it during the initial design and implementation ;-) ...). As you've
discovered, because of the way Axiom has been designed, we're
particularly dependent on the OM* classes in pretty much every aspect of
our implementation.

There are basically three reasons why we are using Axiom in the first place:

 1. The incremental parsing model is very efficient
 2. The fact that it maintains the complete XML infoset makes it
possible for us to support things like XML Digital Signatures
 3. Efficient and well-implemented XML serialization

The first is by far the most important.  If we can get the FOM* objects
speaking just in terms of the org.apache.abdera.model.* interfaces
without sacrificing any of the above three points, then we should do so.

FOMParser and FOMFactory will always need to understand the OM* base.
The various FOMElement derived classes could be made agnostic with a bit
of effort.

- James

Garrett Rooney wrote:
> [snip]
> My question is, is there any other solution I'm missing?  Is it
> reasonable to expect our parser internals to just speak in terms of
> Elements?  Should I head down that road first, before making the
> actual extension changes?  If not, shouldn't we be asking why our code
> needs to know more about the underlying objects but our consumers
> shouldn't?  If we find that functionality useful, wouldn't other
> people?  Just thinking out loud at this point, I really don't know
> enough about the parser implementation to know if I'm even on the
> right track here.
> Thoughts?
> -garrett

View raw message