Changes between XForms 1.0 and XForms 1.0 Second Edition

This section summarises the changes that were made in the move from XForms 1.0 to XForms 1.0 Second Edition.

Although it is worth reading through all of the changes, most of them are unlikely to alter the operation of current forms, except for the way that MIP events are dispatched.

Section 3.3.2 The instance Element

If creation of the detached copy of the inline instance data fails due to an XML error, then processing should halt with an xforms-link-exception.

All data relevant to the XPath data model must be preserved during processing and submission, including processing instructions, comment nodes and all whitespace.

Section 4.1 Events overview

The target for the xforms-submit-error event is now the submission object that is in error, rather than the model that contains it.

Section 4.3.2 The xforms-focus Event

Setting focus to a repeating structure sets the focus to the repeat item represented by the repeat index.

Section 4.3.4 The xforms-refresh Event

All UI bindings should be reevaluated as necessary.

If the value of an instance data node was changed, then the node must be marked for dispatching the xforms-value-changed event. A node can be changed by:

  • confirmed user input to a form control;
  • xforms-recalculate (section 4.3.6);
  • setvalue (section 10.1.9) action.

If the xforms-value-changed event is marked for dispatching, then all of the appropriate model item property notification events must also be marked for dispatching (xforms-optional or xforms-required, xforms-readwrite or xforms-readonly, and xforms-enabled or xforms-disabled).

For each form control, each notification event that is marked for dispatching on the bound node must be dispatched (xforms-value-changed, xforms-valid, xforms-invalid, xforms-optional, xforms-required, xforms-readwrite, xforms-readonly, and xforms-enabled, xforms-disabled). The notification events xforms-out-of-range or xforms-in-range must also be dispatched as appropriate. No ordering is specified for the events.

Section 4.3.6 The xforms-recalculate Event

Events are "marked for dispatch" instead of dispatched as they are tested.

Section 4.4.2 The xforms-value-changed Event

This event is now dispatched during xforms-refresh if the bound instance data node has changed.

Section 4.4.3 The xforms-select and xforms-deselect Events

itemset now supports xforms-select and xforms-deselect.

Section 4.4.6 to 4.4.15 The MIP Events

These are now dispatched whenever the instance node changes, not just when the state of the MIP changes. This means it is no longer possible to spot when the transition is made from enabled to disabled, for example, and also means that a form that is using any of these events will now receive more occurrences than it used to.

Section 4.5.1 The xforms-binding-exception Event

This is now also dispatched if the instance attribute on the submission element refers to an instance element that is in a different model to the submission element.

Section 4.6.7 Sequence: Value Change

The event sequence is now slightly different.

Section 6.1.4 The relevant Property

When false, associated form controls (and any children) and group and switch elements (including content) should be made unavailable, removed from the navigation order, and not allowed focus.

Section 7.7.1 The boolean-from-string() Function

This function now returns false() if it receives an invalid value, rather than throwing a compute exception.

Section 7.8.1 The avg() Function

If any of the input nodes evaluate to NaN then the return value is also NaN.

Section 7.8.5 The index() Function

If the argument to the function does not actually identify a repeat element then the function returns NaN.

Section 9.1.1 The group Element

If a group is non-relevant, then the rendering approach used to signify non-relevance is applied to the entire content of the group. This clarification was made because the old wording implied that when a group was non-relevant, its children could still be relevant.

Section 9.3.5 The insert Element

The at attribute used in insert and delete is evaluated in the context created by nodeset.

Sections 10.1.3, .4, .5, .6 and .11 The rebuild, recalculate, revalidate, refresh and reset Elements

The model is now optional and if absent obeys the usual 'first model' rule.

Sections 7.10.2 and 7.10.3 The days-from-date() and seconds-from-dateTime() Functions

These functions now clarify that the return value is normalised to UTC.

Section 11.1 The xforms-submit Event

All selected instance data nodes are checked for validity as if the xforms-revalidate event was being executed, but no notification events are marked for dispatching. Any selected instance data node that is required but empty, or is found to be invalid, stops submission processing after dispatching the xforms-submit-error event.

If the response includes a body of a non-XML media type (i.e. with a content type not matching any of the specifiers in [RFC 3023]), when the value of the replace attribute on element submission is "instance", nothing is replaced and submit processing concludes after dispatching the xforms-submit-error event.

If an instance is replaced, then the rebuild, recalculate, revalidate and refresh operations are performed on the model, but without dispatching events to invoke those four operations.