Skip to content
ctsims edited this page Aug 22, 2014 · 7 revisions

The JavaRosa Library provides a parser and workflow engine for W3C XForm documents. As the library is intended for use in settings with limited technical resources (such as mobile phones with limited memory and processor resources) only a subset of the XForms library is supported. This set of XForms is a specification agreed upon and followed by the OpenRosa foundation partners.

This document outlines the general implementation of XForms on the OpenRosa platforms, along with any information about how specific components should be handled by various implementations to ensure reliable functioning and consistent user experiences.

Technical Background and Document Standards

OpenRosas forms are an implementation of the 1.0 W3C XForms standard.

OpenRosa XForms should be well-formed XML documents in UTF-8 encoding. Due to restrictions in common libraries, XForm documents should not begin with a Byte Order Mark (BOM) character.

OpenRosa XForm documents should follow the namespacing standards outlined by the W3C. Specifically, to ensure proper functioning on extended forms and platforms, implementations should not fail to parse or process forms which contain elements outside of the XForms namespace.

Philosophy and Intent

OpenRosa XForms are intended to be deployed and integrated into software systems as non-hypertext documents which are used to collect information and create user experiences. This means that many mechanisms which traditionally would be implemented by the HTML layer (like displaying multimedia) are provided with extensions.

Unlike W3C XForms, OpenRosa XForms are intended to be standalone offline document templates. Users will load an XForm template into a compliant platform, enter data, and eventually complete the form after which point it will be processed and submitted by the host application.

OpenRosa XForm platforms are expected to provide their own navigation cues and overall process workflow. Rather than using the internal "next"/"rebuild"/etc actions, the platform should be able to traverse the form independently.

Major Deviations

Here is a list of major deviations from the W3C recommendations in the OpenRosa XForms Standard:

  • tags can be respected to provide an endpoint, but are not expected or required. Platforms are expected to provide their own cue to the user for completing a form, and should be able to provide transport independent of any information in the form
  • The XForms Events framework is largely unimplemented. Although the processing rules for updating the internal model follow the algorithm and process laid out in the recommendation, that processing occurs internally rather than being fueled by event processing.

For more specific deviations and how to handle them, visit the XForms Deviation page

Custom Content

There are a number of conventions that OpenRosa members follow to enable custom or advanced behaviors in forms. Every effort has been made to ensure that these extensions are optional, and fallback gracefully into behavior that is acceptable. These areas should be outlined as necessary in each area of he documentation.

XForms Specification Outline