cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ricardo Rocha <rica...@apache.org>
Subject Re: XSPGenerator
Date Tue, 12 Dec 2000 14:11:03 GMT
 >> That would bring at least full page content aggregation!

This probably means _generator-based_ content aggregation.

A more general approach to [SAX-based] content aggregation
would be that of aggregating complete sub-pipelines.

Here, the term "pipeline" is being used with a meaning slightly
different from that of Cocoon's ResourcePipeline class: it means
a generator plus zero or more transformers, _sans_ a final
serializer.

 From this perspective, Pipeline extends Generator, so it's possible
for a pipeline to contain another pipeline as its generator.

If we could request the sitemap to create such pipelines, it would
be possible to do content aggregation in a much general way.

This, in turn, calls for caching intermediate results (i.e. SAX
events generated by (sub)pipelines).

If we have a "SAXCacheable" interface that XMLProducer
implementations (i.e. Generators and Transformers) can also
implement, then intermediate pipeline results could be cached
by interposing a "tee" ContentHandler that would take care of
caching generated SAX events (using a mechanism like Stefano's
XMLCompiler). This reminds me of good ole' Unix "tee" command
used in os pipelines for exactly the same purpose...

Well, just an idea..

 > I'm trying to call a generate methode from another
 > XSPGenerator.
 >
 > class _index_xml extends XSPGenerator{
 >     public void generate() throws SAXException {
 >    /* some SAX */

Calling a generated XSP class directly doesn't sound appealing
to me. We come to depend on otherwise hidden implementation
details like the generated class/package names and the like.

A think a cleaner approach to content aggregation and SAX event
caching is the one (vaguely) presented above, but it involves
revising the way the sitemap currently handles pipelines. Most
notably, it requires separating the notion of pipeline as such
and its final serialization, as well as providing a mechanism
to generate dynamic pipelines on the fly...

Ricardo

===================================================================

Torsten Curdt wrote:

>> Yes! This seems to work!! 8-))
>> But we need the generateContent() method.
>> This must be changed when generating the java code.
>> 
>> So can we change the XSPGenerator class? Are there any
>> Problems that I might not see?
>> 
>> That would bring at least full page content aggregation!
> 
> 
> And the page to be included needs to be in the dependencies list!


Mime
View raw message