Allow submission elements without model element

From W3C XForms Group Wiki (Public)
Jump to: navigation, search

Allow submission elements without model element

Allowing a form author to only add a submission without the need to add a model will help the gradually introduction of the MVC model. A new form author can start with forms that only contain form controls, and add a submission element when he needs it. When the author requires more advanced features he can add the model element which will enable more advanced feature (eventing).

Proposed spec changes

10.15 The send Element

...

submission attributes

These attributes if specified will override the attributes specified in the referred submission.

If no resource or action was specified on the refered submission the resource attribute or child element is required on the send element.

The table below provides an overview of the child elements of the XForms send element, including their attributes and content models.

Element Overview of Attributes Overview of Content Model
resource value (string XPath Expression) PCDATA
method value (string XPath Expression) PCDATA
header nodeset (nodeset XPath Expression) name, value

Note: The same modifications need to be made to the submit action.

11.1 The submission Element

...

resource

Optional attribute indicating the destination URI for submitting instance data. This attribute is required unless the destination URI is provided by the resource element, which can dynamically specify the URI based on instance data, or the action attribute. This attribute should be used in place of the action attribute. Behavior of relative URIs in links is determined by the host language, although [XML Base] processing is strongly recommended.