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 Generator, Components question
Date Thu, 10 May 2001 14:51:54 GMT
Hejsan,
First off, I would like to thank you guys for a great piece of software!
Thanx!

Now to my question:
The sitemap is great for setting up pipelines and relating URI to them
but I would like to do it in a more dynamic fashion.
The application I´m developing is based on the concept of a page. A page
contains components like paragraphs, pictures, links, search-objects
etc. The description of a page is saved in a database. Basically the
description contains references to the components that should be
included in the page at requesttime.
There are generators for each kind of component to enable them to be
generated outside of a page.
What I would like to do is to create a page generator which based on a
database request triggers the generators for each component.
Basically I would like to achieve dynamic content aggregation.
The flow would look something like this:

request -->
pagegenerator
transformer-->serializer

|
|

|
|
                            --
>paragraphgenerator-->paragraphgenerator-->linkgenerator->paragraphgenerator--

Flow for the pagegenerator:

        generate:

        0.9 Generate wrapping XML
        1. SQL question to retrieve ids for pageobject
        2. For each page object:
                    setup the component (set the src to the id we like
to retrieve, pass along the objects from the pagegenerators setup)
                    generate
         3. Generate wrapping XML

Is this approach possible?
How do I let each component call the pagegenerators contenthandler? ie
how do I get a reference to it...
This approach would mean that each component would generate a
startdocument, how would C2 react to multiple startdocuments in a
stream? How can I prevent that?
A possible solution would be to implement the contenthandler interface
in the pagegenerator and then "swallow" all startdocuments from the
components but I don´t see how it can be done.

Maybe this approach is wrong...suggestions anyone?

/Regards Mats

-
Mats Norén
Spectral AB
Banérgatan 37
115 22 Stockholm
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