cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Kostopoulos <ste...@metrobrowser.com>
Subject [need advice] dom-based components
Date Tue, 10 Jun 2003 20:27:23 GMT
Hi,

what is the best way to write dom-based pipeline components for cocoon 
that can
coexist transparently with standard SAX-based components?

E.g. a XSL transformer component that operates on a (DOM) document 
handle
instead of SAX events and then looks ahead for the next pipeline step 
and either
passes the document handle on or generates SAX events depending on what
the next component can handle.

I have looked at the AbstractDOMTransformer, but this would defeat the 
whole point by
building up the dom in every step even if there was a DOM to begin with.

My temporary solution is to store a reference in the session, similar 
to the
Read/WriteDOMSessionTransformer, but this requires 3 pipeline steps to 
do a simple
transformation:
1. Write to Session
2. Do transformation on DOM stored in session
3. Read back from the session for serialization

Has anybody done something similar or can give an advice how to do this 
elegantly?

Background:
I am developing some cocoon components that use the infonyte
PDOM (persistent dom) and PXSLT implementations. PDOM can handle huge
documents that would normally blow main memory by persisting them on
secondary storage.

For more information visit: http://www.infonyte.com/en/products.html

Regards,

Stefan


Mime
View raw message