Jeff Sexton wrote:
We'd like to built an application that uses data from a database to create
XML, which can be transformed to various forms.  A significant amount of
coding will be required to create the XML (otherwise I'd just place SQL in
an xsp), so I think a separate servlet will make more sense.  My thought
is to create a servlet that outputs type text/xml, call the servlet from a
sitemap, transform and serialize as needed.

I don't quite get why you came to the conclusion that a servlet is better for serious coding than the Cocoon environment. IMHO you should back up and reconsider that. If the xml is going to go through Cocoon, I really don't think you have a better option than writing your own Generator, whether you do that through XSP or directly as a Generator doesn't matter. Programming in raw SAX is not as simple as JDOM but if you have a large dataset or are otherwise performance sensitive, you want to go straight to SAX, not JDOM/DOM and not string (which is probably your only option with Servlet apart from sticking a DOM in the session). I wrote a tutorial on custom Generators for the Cocoon docs that is still fairly recent and should be a good head start though it's not perfect.


Can you explain by the way why so much coding is required to get from the ResultSet(s) to xml?

Geoff Howard


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to