You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Oleg Tkachenko <ol...@multiconn.com> on 2002/07/24 20:05:17 UTC

Re: Embedding without writing to a file

Christian Wolfgang Hujer wrote:

> I don't know anything about FOP's internals, but wouldn't it be even better to
> use a DOM structure and pass a Document to FOP?

There is no difference from fop's point of view actually, but why do you want 
to create this potentially huge superfluous object? Using DOM probably 
requires less efforts from a developer, but if you do care a little about 
efficiency, you know that dom and sax are just Boeing-747 and F-16. DOM object 
is a full tree representation of the document hence it consumes a lot of 
memory, while SAX is an extremely lightweight callback-based approach and 
almost doesn't consume any memory.

> Or is FOP working on low-level SAX instead of high-level DOM anyway?

On building fo tree from an input - sure.
-- 
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel


Re: Embedding without writing to a file

Posted by Christian Wolfgang Hujer <Ch...@itcqis.com>.
Hello Oleg, dear list members,

Am Mittwoch, 24. Juli 2002 20:05 schrieb Oleg Tkachenko:
> Christian Wolfgang Hujer wrote:
> > I don't know anything about FOP's internals, but wouldn't it be even
> > better to use a DOM structure and pass a Document to FOP?
>
> There is no difference from fop's point of view actually, but why do you
> want to create this potentially huge superfluous object? Using DOM probably
> requires less efforts from a developer, but if you do care a little about
> efficiency, you know that dom and sax are just Boeing-747 and F-16. DOM
> object is a full tree representation of the document hence it consumes a
> lot of memory, while SAX is an extremely lightweight callback-based
> approach and almost doesn't consume any memory.
I just think DOM is a bit easier to use than a callback event driven interface 
like SAX.
And the source might already be a DOM structure. So if it already is DOM, it 
already is a "potentially huge superflous object".

Bye
-- 
ITCQIS GmbH
Christian Wolfgang Hujer

Geschäftsführender Gesellschafter
Telefon:+49  (0)89  27 37 04 37
Telefax:+49  (0)89  27 37 04 39
E-Mail:Christian.Hujer@itcqis.com
WWW: http://www.itcqis.com/