[prev in list] [next in list] [prev in thread] [next in thread] 

List:       xml-cocoon-users
Subject:    Re: JAXB in Cocoon 3 Pipeline
From:       Simone Tripodi <simone.tripodi () gmail ! com>
Date:       2010-02-17 7:37:23
Message-ID: 4173dc211002162337n608a7856y6c77303cce449dd6 () mail ! gmail ! com
[Download RAW message or body]

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 <xasima@gmail.com> 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: users-unsubscribe@cocoon.apache.org
For additional commands, e-mail: users-help@cocoon.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic