You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Spectron International, Inc." <sp...@coqui.net> on 2003/05/06 15:38:05 UTC
JDOM and Cocoon
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