cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Spectron International, Inc." <spect...@coqui.net>
Subject JDOM and Cocoon
Date Tue, 06 May 2003 13:38:05 GMT
I have a servlet generator that looks like this:

class MyServletGenerator{
    private Document doc=new Document(new Element("page"));
    // set up the document
    void prepare(){  }
    //
    public void generate() throws IOException, SAXException,
ProcessingException {
      try {
        prepare();
        // send document
        SAXOutputter outputter = new SAXOutputter(contentHandler);
        outputter.output(doc);
      } catch(Exception ex) {
        throw new ProcessingException("Error converting document to SAX
stream", ex);
      }
   }
}

It seems to me that since Cocoon uses XML everywhere there must be a better
way (more efficient) way of doing this. Maybe there is a cache of JDOM
objects somewhere in Cocoon that I can use, just like the Datasources, so I
dont have to create the JDOM object on every request. I don't know I'm just
curious.

Faw



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


Mime
View raw message