I followed this tutorial on how to use OpenOffice to create XForms.

It was a great tutorial, very easy to follow, and guided me through the process of creating a decent form for our Vessel schema. My form can be found here (unclick the "edit file" button in the top toolbar to actually use the form). It looks like this:

The process was a little tedious. I had to completely create the model (build up all of the XML elements and attributes which are named in the schema), the view (use the WSIWYG editor to create form controls, which you'll have to do with any form builder), and the bindings (connect form controls with the XML elements/attributes). That said, it was fairly straightforward and when I run the form from OpenOffice, I easily get an XML instance document.

Two main problems that I had / am having:

  1. In the model I accidentally created our top level element (Vessel) underneath the default top level element (instanceData). Turns out that there are no UI controls to move elements from one tree to another, so were we going to use this form I would have to delete the whole model and start over. Not a technical difficulty, just annoying UI design (or lack of implementation, so far). Update: According to this article (and I tried it to confirm) you can import an XML instance document to be your model. That seems to make design way easier.
  2. I can't get the XForm out of OpenOffice. This could be a show stopper if we don't figure something out. The tutorial is geared towards just sending someone an OO document and having them submit from there. That actually could be an option, though it's not quite as clean as a web form which we can update from a central location. And just the fact that we can't get XForms out of OO would make the system substantially less adaptable and modular. There has to be some way to do it...

Here is an article that discusses how to create an XSLT transformation to import various styles of XML into OpenOffice to be an XForm embedded in ODF. You could probably do something similar for the export if you knew more about XSLT than I do (John?).

Here is a forum thread where everyone is asking if OpenOffice can output XForms (no one however is answering).




blog comments powered by Disqus

Published

18 December 2008

Category

work

Tags