30. XForms Module

Contents

This section is normative for purposes of defining the integration of XForms into XHTML 2.0. The XForms language itself is normatively defined in [XFORMS].

The XForms Module provides a rich collection of forms features within the XHTML namespace.

The content model for XForms defines several content sets:

XForms Core
model
XForms Form Controls
input | secret | textarea | output | upload | range | trigger | submit | select | select1
XForms Actions
action | dispatch | rebuild | recalculate | revalidate | refresh | setfocus | load | setvalue | send | reset | message | insert | delete | setindex
XForms Group
group
XForms Switch
switch
XForms Repeat
repeat

30.1. Core XForms

When this module is included, the XForms Core content set is added to the content model of the head element in the Document module, to the Structural content set of the Structural Module., and to the Text content set of the Text module.

30.2. XForms Actions

When this module is included, the XForms Actions content set is added to the content model of the head element in the Document module, to the Structural content set, and to the Text content set.

30.3. Form Controls

When this module is included, the XForms Form Controls content set is added to the Structural content set, and to the Text content set.

The Text content set is added to the XForms UI Inline content set, allowing various XHTML elements inside form control labels.

30.4. Group

When this module is included, the XForms Group content set is added to the Structural content set, and to the Text content set.

group elements can freely nest.

The Structural content set is added to the XForms Group content set.

30.5. Switch

When this module is included, the XForms Switch content set is added to the Structural content set, and to the Text content set.

Alternating switch and case elements can freely nest.

The Structural content set is added to the content model of case, after an optional label element.

30.6. Repeat

When this module is included, the XForms Repeat content set is added to the Structural content set, and to the Text content set.

repeat elements can freely nest.

The Structural content set is added to the content model of case, after an optional label element.

30.7. XForms Repeat Attribute Collection

This module also includes the XForms Repeat Attribute Collection via attributes from [XFORMS]. The normative definition of those attributes and their semantics is included in that specification. They are described briefly below:

repeat-model = IDREF
This attribute defines the XForms model to be associated with the element.
repeat-bind = IDREF
This attribute provides a reference to an XForms bind element.
repeat-nodeset = LocationPath
This attribute defines an XPath LocationPath that maps to an XForms bind element.
repeat-startindex = Number
XForms hint to the processor as to which item from the collection to display first.
repeat-number = Number
XForms hint to the processor as to how many items from the collection to display at a time.

When this module is included, the XForms Repeat Attribute collection is included on all elements that can validly appear twice or more as sibling elements.

30.8. Other Attribute Collections

XHTML 2 adds the Common attribute group to the XForms Common Attribute Group.

The Linking Attribute Group is allowed on all elements, including instance.

The XForms Attribute Groups for single-node binding and Nodeset binding are allowed only on the XForms elements they are defined for.

Allow binding attributes everywhere?

Should we allow binding attributes anywhere, behaving much like the src attribute, except obtaining a value from an XForms Model?

Implementation: XML Schema