The OpenDocument web site is not longer accepting new posts. Information on this page is preserved for legacy purposes only. For current information on ODF, please see the OASIS OpenDocument Technical Committee.

Generating Generic XForms for OpenOffice

You can generate XForms in OpenOffice from sample input -- as long as you're aware of the technique's limitations. A previous article on XForms in OpenOffice showed how to create a simple XForm in OpenOffice. The introduction to this particular technology came while working on the Danish UBL project, which needed a cross-platform implementation for some of the twenty-three (23) UBL 2.0 document types intended for use by small businesses. The project initially supported only three types: Invoice, CreditNote, and Order, but had a stated goal of supporting all the UBL formats. Unfortunately, it proved impossible to create this solution purely in XForms in OpenOffice. The project required supporting documents containing all possible elements, but the UBL Order implementation ran into performance problems, because, as described in the previous article, it keeps every binding in memory; therefore, a large number of bindings slows down the implementation measurably. Obviously, the complexity of expressions can also affect this. In my experience, forms that exceed several hundred bindings are unusable. A 10-line UBL Order was likely to have 500 or more bindings, and thus was not usable in an OpenOffice XForm. Nonetheless, the route to discovering this depressing information did produce some useful tools and techniques for others who want to work with smaller XML documents in OpenOffice. Because OpenOffice's internal representation is ODF XML, it is natural to generate ODF from other XML formats using an XSLT transformation. This applies equally well to an XForm inside of an ODF document. You always need to take a few things into account when making an XSLT transform, such as the processor and the context (web server, command line application, etc.). OpenOffice adds yet another consideration: You have the possibility of running the transformation as an XSLT Filter. An XSLT Filter combines an XSLT stylesheet and some OpenOffice settings registered in OpenOffice that allows OpenOffice to open various XML-based formats and work with them in the context of the application. This article explains how to create an OpenOffice XSLT Filter that applies generically to all example XML instances -- in other words, it's as a basic tool for working with XML in OpenOffice XForms. We demonstrate a method to generically transform XML input formats to generate XForms that will run in OpenOffice so users can edit the XML input values. The XSLT used in the article is sufficiently configurable that you can maintain, extend, and reuse it relatively easily without breaking functionality.

Read the complete article by Bryan Rasmussen in Focus Areas: BPEL | DITA | ebXML | IDtrust | OpenDocument | SAML | UBL | UDDI
OASIS sites: OASIS | Cover Pages | | AMQP | CGM Open | eGov | Emergency | IDtrust | LegalXML | Open CSA | OSLC | WS-I