Hi, This is my first post. I have been trying to understand XForms off and on for about the last 14 hours.
I was interested in migrating an MS Access application to OpenOffice.orgBASE and then upsizing to a web-app using XForms with MySQL. I did not expect automatic translation, but I thought (from the buzzwords) that I would be able to use an XForm in BASE and then upsize the databse from HSQL to MySQL and then export the XForms to some other web-based XForma application (from the list in the WikiPedia article on XForms). That was 14 hours ago. Now that I have everyone ROFL. Here is what I was able to learn. 1. "In OpenOffice.org, an XForms document is a special type of *Writer*document. [.odt file]" from OpenOffice.org Writer HELP. In Writer, Choose *File - New - XML Form Document*. 2. Other XForm applications expect XForms documents to be an ASCII text file with tags similar to an HTML file. From the Orbeon mailing list Nov. 2005: I was impressed to see that File>New included the option for a new XForm. But I wasn't too clear on what to do next. Added a few fields (or so I thought) and tried saving it. I thought OO2 native file formats were now XML, but they seemed to be binary still. http://www.nabble.com/XForms-in-OpenOffice-2.0-tf481229.html#a1309823 3. A Writer document is in Oasis Open Document Format which is: a. compressed (like a Zip archive), so it appears at first glance to be binary Another source of extensibility is OpenDocument's package concept. A package is a zip file ZIP<http://idealliance.org/proceedings/xtech05/papers/03-02-02/#ZIP>that on the one hand allows it to split a single OpenDocument document into several streams, where each stream contains a certain kind of information, but on the other hand also allows it to add arbitrary streams that contain information not defined by OpenDocument itself. That is, an OpenDocument package file may contain streams that are not specified by the OpenDocument specification, and therefore may contain extensions to the OpenDocument format. http://idealliance.org/proceedings/xtech05/papers/03-02-02/ b. has XForms embedded in it XForms is designed to be embedded in another XML format. It consists of two major parts, the XForms model which contains the form logic plus form data, and the XForms controls, which can be bound to a data model. In the OASIS Open Office 1.0 we embed the W3C XForms model as defined by the <xforms:model> element into the <office:forms> forms container. http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/OpenDocument-v1.1.html#11.2.XForms%20Model|outline <http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/OpenDocument-v1.1.html#11.2.XForms%20Model%7Coutline> c. the embedded XForm uses different controls than those specified in the XForms standard. In the OASIS Open Office 1.0 we embed the W3C XForms model as defined by the <xforms:model> element into the <office:forms> forms container. The controls (see 11.3) will be left as is, except that they receive an xforms:bindattribute, which allows *to bind any OpenDocument control to a previously defined XForms model. *http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/OpenDocument-v1.1.html#11.2.XForms%20Model|outline <http://docs.oasis-open.org/office/v1.1/OS/OpenDocument-v1.1-html/OpenDocument-v1.1.html#11.2.XForms%20Model%7Coutline> http://docs.oasis-open.org/office/v1.1/OpenDocument-v1.1.pdf OpenDocument-v1.1-os.odt, 1 February 2007, Page 410 of 738 The controls used here are the same as the ones that can be bound to databases. That is, OpenOffice.org uses the XForms model but does not use the XForms UI. http://idealliance.org/proceedings/xtech05/papers/03-02-02/ 4. The specifications for the BASE Form Wizzard call for opening WRITER Action New Form Menu entry Insert -> New Form Toolbar yes What happens Opens the OpenOffice.org Writer in form mode1 <#sdfootnote1sym>. (see ) When enabled When the database file is writable. 1 <#sdfootnote1anc>This will be described in an extra specification about forms. 5. The DBA Developers Project (list) includes a "Dialogs with forms functionality" task When creating a form, the user always needs to bother with a writer (or calc or draw) document. Very often, this is much too oversized. It would be sufficient to have a simple dialog which contains all the data access controls. Now that we have UNO-based dialogs (in the Basic IDE), this is possible in general, as there already are some basics for doing this. There still would be a lot of work to be done (not mentioning the concrete design), but since some months, it's at least possible. The advantage would be to not slay the user with things she does not bother – a writer document offers a lot of possibilities which are not relevant for a form. In some cases, a full writer document does even contradict to what users expect from a form http://dba.openoffice.org/development/projects.html#form_dialogs 6. It might be possible to extract the XForms from the WRITER cocument programatically using an API The use of packages is optional. OpenDocument defines documents that are stored within a package as well as documents that are stored as a plain or flat XML file. However, for documents stored by end users, the packaged OpenDocument variant will be used in almost all cases. The purpose of the flat variant is the exchange of documents between XML based components, for instance within XML pipelines. Consequently, most office application user interfaces will only offer loading and saving of the packed OpenDocument files and will support flat XML files only as part of their programming API. http://idealliance.org/proceedings/xtech05/papers/03-02-02/ Questions: 1. Is there a way to extract and save in uncompressed ASCII text format the XFORMS stream or section from the WRITER file package? If one suceeded in extracting the XFORMS how would it have to be modified for use in other XFORMS applications? How does one identify a specific instance of XFORMS in an Open Document file? 2. Should there be an option to use the native XFORMS controls; or should they always be overridden for compatibility with market leading office suite. Is there some way to balance compatibility with MS Access controls and using native XFORMS controls(which would facilitate interoperability with other XForms applications)? Jim Callahan Orlando, FL