cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anuja Gokhale <>
Subject RE: Writing my own Producer to generate dynamic XML- How do I pas s parameters to a custom generator that extends Abstract Generator
Date Mon, 25 Aug 2003 18:21:11 GMT

thanx. I was able to write my own custom generator that works with static

I however need my generate to generate an XML document based on the user's
input (form data). How can I pass and retrieve request parameters to and
from my generator (My generator extends the this what
i should be using?)

Attached is the source for my simple generator...

public class MyGenerator extends AbstractGenerator {
  public void generate () throws IOException, SAXException,
    ProcessingException {
	  RequestParameterModule requestData = new RequestParameterModule();
      String message = "<doc>" + requestData.getAttribute + "</doc>";

      XMLReader xmlreader = XMLReaderFactory.createXMLReader();
      InputSource source = new InputSource(new StringReader(message));


-----Original Message-----
From: Joerg Heinicke []
Sent: Thursday, August 21, 2003 6:48 PM
Subject: Re: Writing my own Producer to generate dynamic XML

The component you search for is "generator" 
There are already different technologies generating XML from DB 
( Also 
search on for more information.


Anuja Gokhale wrote:

> Hello,
> My application needs to read information from a DB plus do other stuff and
> then have this displayed in different views. For this, I was planning on
> writing a Producer that generates my XML and then defining XSL transformer
> to operate on this dynamic XML.
> Here are my questions:
> 1) Should my producer implement the AbstractProducer interface (even
> I may never use the HttpServletRequest and response objects to generate my
> XML)
> 2) Where do I define my producer for cocoon? In the sitemap?
> 3) How can I ensure that this Producer gets called when I need to get my
> dynamic XML data?
> -Anuja

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message