cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mats Norén <mats.no...@spectral.se>
Subject Content Aggregation
Date Mon, 14 May 2001 11:11:10 GMT
Hi,
I´ve been looking at the content aggregation in C2 with both the
XInclude from XSP and with the aggregation in the sitemap.
It´s my understanding that in the sitemap the aggregator is basically a
generator for a specific pattern and that the one of the differences in
the behaviour of the aggregator is that it requires a sitemap object to
gain access to the pipelines of the different parts that should be
aggregated.
The four methods that differ are:

setSitemap(...);
setEnvironment(...);
setRootElement(...);
addPart(....

I have written a generator that poses a query against a db and then
tries to fire of generators accordingly. Now this would be a really
simple thing to do with the current implementation of the content
aggregator:

generate()
{
    do query against db
    for each rs call addPart(....)
    collectparts()
    start document
    start element
    fire of the collected parts
    end element
    end document
}

The only difference being that instead of getting the parts parameters
from the sitemap I take them from the db.
Since I don´t want to break the current implementation, I was wondering
if there is an interest in doing these request based content
aggregations and if there is a need for a Aggregator-interface and some
changes to the sitemap that would enable me to choose from different
aggregators?
The aggregator interface could be the four methods:
        setSitemap(...);
        setEnvironment(...);
        setRootElement(...);
        addPart(....

<map:aggregators default="sitemap">
    <map:aggregator name="sitemap"
src="org.apache.cocoon.sitemap.ContentAggregator"/>
    <map:aggregator name="db"
src="org.apache.cocoon.generation.PageGenerator"/>
    ...
<map:aggregators>

I don´t know if this is possible but it would make my life easier ;-)

Any comments?

/Mats


--
Mats Norén
Spectral AB
Banérgatan 37
115 22 Stockholm
Phone: +46 8 506 335 14
Fax: +46 8 506 335 10
Cellular: +46 704 924 396
mailto:mats.noren@spectral.se



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


Mime
View raw message