cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Boisvert, Eric" <ebois...@nrcan.gc.ca>
Subject RE : RE : Does CInclude/Include transformers buffer incoming documents ?
Date Sun, 16 Dec 2007 01:05:18 GMT
>That's not quite true. Yes, you can write XSLT in a bad way (using
>XPaths starting with double slash for example), which indeed forces the
>whole document to be loaded. 
 
Well.. I stand corrected. Thank you for this information.  So the XSLT engine is smart enough
to analyse the stylesheet and load a subset of the document (I'm impressed)
 
> It uses SAX to stream through the included documents 

ok. but is the thing buffered (as a character buffer) in memory before being parsed ?
 
thanks, and sorry for persistent questionning
 
Eric
 
 
________________________________

De: Joerg Heinicke [mailto:joerg.heinicke@gmx.de]
Date: sam. 2007-12-15 19:52
À: users@cocoon.apache.org
Objet : Re: RE : Does CInclude/Include transformers buffer incoming documents ?



On 15.12.2007 19:35 Uhr, Boisvert, Eric wrote:

> I agree in principle, this is how cocoon works, in theory. But, for
> example, as soon as one puts an XSLT transformer in the pipeline, the
> document is indeed read completly in memory (in a DOM structure) simply
> because XSLT (XPath) allows to reference any part of the document -
> which force the whole document to buffered in memory prior to execute XSLT.

That's not quite true. Yes, you can write XSLT in a bad way (using
XPaths starting with double slash for example), which indeed forces the
whole document to be loaded. But if you write it in a good way the XSLT
processors have some optimizations to only load the most necessary parts
of the document.

> Now I'm redesigning the architecture and exploring the idea of using
> Cinclude to dispatch WFS queries and I was afraid Cinclude was
> 'buffering' the document in memory

 From the implementation of the CIncludeTransformer: It uses SAX to
stream through the included documents - except when you use the select
attribute. Then it creates a DOM and executes the select on it.

Joerg

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


Mime
View raw message