Hi Xasima, sorry if I missed your email and if I reply so late. Very sorry. The strategy I can suggest you is the same I applied for the BetwixtBeanGenerator[1], your thought is right you just have to take a look at the 'setSAXConsumer(SAXConsumer xmlConsumer)' method implementation; since SAXConsumer interface extends the ContentHandler interface, you just need to run your pipeline component ;)
This kind of components has to be definitively integrated in the optional package, but we've to check first the licensing issues, I'll propose it on the dev mailing list. If you're pleased to provide a patch, feel free to do it, I'll follow the thread and take care to apply it, if licenses allow :) All the best, Simo [1] http://tinyurl.com/ygjdx6e http://people.apache.org/~simonetripodi/ On Sat, Jan 23, 2010 at 5:40 PM, Xasima <[email protected]> wrote: > Hello. I need to use JAXB marshalling as a (SAX-based) generator in cocoon 3 > pipeline. > Smth like this.... > > --------- > // Prepare marshaler > JAXBContext context = JAXBContext.newInstance(....); > Marshaller marshaler = context.createMarshaller(); > marshaler.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE); > marshaler.setProperty(Marshaller.JAXB_FRAGMENT, Boolean.TRUE); > > // Marshaller can output SAX to ContentHandler > ContentHandler handler = .... > marshaler.marshal(object, handler); > > Pipeline<SAXPipelineComponent> pipe = new > NonCachingPipeline<SAXPipelineComponent>(); > ... > --------- > How to perform this ? > > Thanks. > > > > > -- > Best regards, > ~ Xasima ~ > > > > -- > Best regards, > ~ Xasima ~ > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
