This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes Java in General and the fly likes Howto build odf proccessing workflow? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Howto build odf proccessing workflow?" Watch "Howto build odf proccessing workflow?" New topic

Howto build odf proccessing workflow?

Pete Neu
Ranch Hand

Joined: Feb 18, 2005
Posts: 86

I'm faced with the task of including MS Word documents into a web app and then maintaining them for good.

So my idea was:
User provides ODF document because he uses the ODF Plugin for MS Word 2003. When something changes he just provides new ODF document.-> This part is non negotiable.

Then I just need some way to process this odf document store it in a db and retrieve it later for usage in the web app.

A quick google search told me there is the Uno Runtime Environment from OpenOffice that can take care of that. But is this the best solution using such a heavy weight architecture? I read somethere they are going to downsize it: But it's not ready yet.

Off the top of my head I would say: Just open the odf archive extract the content.xml file put it into the db and retrieve it when needed. I saw there
are some xsl sheets provided by OpenOffice so these could come in handy when doing the actual data processing.

What would you guys think? Any ideas?

[ January 26, 2007: Message edited by: Pete Neu ]
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 42965
It depends on what you mean by "processing the ODF document". For storing it in a DB, and later retrieving it, you don't need a way to actually open and make sense of the document. But if "processing" means getting at the contenst and modifying them (beyond opening the zip file and extracting the constituent files), then some ODF-understanding Java code is required. (Unless the required modifications can be done by XSLT, as you point out.)

So, I think you're on the right track.
Pete Neu
Ranch Hand

Joined: Feb 18, 2005
Posts: 86
Unfortunately I will have to make sense of the document. Meaning the content
should be presented in the same way as in the word document on the web page. As far as web design allows that.

This means I will have to extract the content and some style information. The style information will really only be markers which reference on some css code.
The tricky part is to find a clean approach to this. In essence what I have at my hands is a content-management-transformation system which has to be very light weight. Users don't expect to wait 2 minutes for some xml information
to be transformed in order to be displayed on a web page.
[ January 29, 2007: Message edited by: Pete Neu ]
D Rog
Ranch Hand

Joined: Feb 07, 2004
Posts: 472

I agree with Ulf D.

Retire your iPod and start with HD Android music player Kamerton | Minimal J2EE container is here | Light weight full J2EE stack | and build tool | Co-author of "Windows programming in Turbo Pascal"
I agree. Here's the link:
subject: Howto build odf proccessing workflow?
It's not a secret anymore!