Re: how to create a fo2doc serializer ? or transform ?

Bertrand Delacretaz <[email protected]> Fri, 12 Dec 2003 10:12:22 +0100
Newsgroups gmane.text.xml.jfor.devel
Message-ID <[email protected]>
Le Mercredi, 10 d=E9c 2003, =E0 18:48 Europe/Zurich, J=E9r=F4me Dupont a =
=E9crit :

> I try to build a fo2doc serializer based on jfor, so I tried to modify=20=

> the
> fo2rtf serializer.
> I convert the input to a rtf file thanks to jfor converter, then I=20
> convert
> the rtf file to a doc file (jacob.jar and jacob.dll), but I don't know=20=

> how
> to send the result to the pipe ? My setOutputStream method should end=20=

> with
> something like : super.setContentHandler(handler) . How can I put my=20=

> doc
> content to the handler ?

This is more a question for the cocoon-users list.
You might want to have a look at the Cocoon HSSFSerializer source code,=20=

which generates Excel files, IIUC what you're trying to do is similar.

> I have also try to keep the fo2rtf serializer and to build a=20
> transformer
> which convert rtf to doc, but I wonder if it is possible to build a
> transformer whose input isn't a xml file ?

It's not possible (unless doing weird things with SAX events) as Cocoon=20=

sitemap components communicate through SAX events, so your first=20
approach with a seralizer sounds better. I'm not sure about the results=20=

(performance + formatting) of going through an XML to RTF to DOC=20
conversion, though.

Hope this helps,
--
   Bertrand Delacretaz
   independent consultant, Lausanne, Switzerland
   http://cvs.apache.org/~bdelacretaz/



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click