On Thu, Nov 15, 2001 at 12:28:30PM -0500, Peter Royal wrote: > On Thursday 15 November 2001 11:50 am, you wrote: > > Okay, one piece of theoratical question. If I want to use xml data output > > from a bunch of EJBs (JBoss+Cocoon stuff), shall I better write a > > Transformer or a Generator for getting the data? > > > > I'd vote for Transformers, which looks for xml tags in a source xml like > > <customer-data/>, and replaces it with the business data coming from EJBs, > > which gets rendered by an other (eg. the default XSLT) Transformer right > > after. > > > > Is that the correct way handling the situation? > > That works, but exception handling that way can be a pain because you can > only throw a SAXException once the transformer gets going. > > I recently refactored my project to use a lot of transformers, I think its > more manageable that way. I have a transformer that inserts data similar to > your need, and it works by loading the data in the setup() method, and then > spitting it out once the appropriate tag is seen.
Peter, exactly where had you put your own Transformers? I've tried to put it in my own package (not in org.apache.cocoon.transformation), jar-ed it correctly, dropped the jar into Cocoon's main WEB-INF/lib/, configured it in the sitemap, and got a ClassNotFoundException. Do I have to use the cocoon.transformation package for my Transformators, or where should I put it to let Cocoon to use it? Christopher -- .Digital.Yearning.for.Networked.Assassination.and.Xenocide --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. <http://xml.apache.org/cocoon/faqs.html> To unsubscribe, e-mail: <[EMAIL PROTECTED]> For additional commands, e-mail: <[EMAIL PROTECTED]>