W3C

XForms 1.0 (Second Edition)

W3C Recommendation 17 June 2005

This version:
http://www.w3.org/TR/2005/REC-xforms-20050617/
Latest version:
http://www.w3.org/TR/xforms/
Previous version:
http://www.w3.org/TR/2003/REC-xforms-20031014/
Editors:
John Boyer, PureEdge Solutions Inc.
David Landwehr, Novell
Roland Merrick, IBM
T. V. Raman, IBM

This document is also available in these non-normative formats: single HTML file, diff-marked HTML, and Zip archive.


Abstract

XForms is an XML application that represents the next generation of forms for the Web. By splitting traditional XHTML forms into three parts—XForms model, instance data, and user interface—it separates presentation from content, allows reuse, gives strong typing—reducing the number of round-trips to the server, as well as offering device independence and a reduced need for scripting.

XForms is not a free-standing document type, but is intended to be integrated into other markup languages, such as XHTML or SVG.

Status of this Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at http://www.w3.org/TR/.

Table of Contents

1 Differences between XForms 1.0 and 1.1
    1.1 Model and instance
    1.2 New Datatypes
    1.3 Submission
        1.3.1 Submission: attributes
        1.3.2 Submission: elements
        1.3.3 Submission for Soap
    1.4 Events
    1.5 New Functions
        1.5.1 Encoding and decoding functions
        1.5.2 Control functions
    1.6 Controls
    1.7 Actions
        1.7.1 Actions: insert and delete
        1.7.2 Conditional and repeated actions
        1.7.3 New attribute on dispatch action
        1.7.4 Additions to actions


1 Differences between XForms 1.0 and 1.1

This list reflects the differences between the Rec version of XForms 1.0 and the last call version of XForms 1.1, and only feature a high-level view of the differences.

Many of the changes only effect minor details about the processing model (such as clarifications).

Most of the changes are additions and simplifications, though control of submission has greatly improved.

1.1 Model and instance

New version attribute: <model version="1.1">...

New resource attribute: <instance resource="...">

1.2 New Datatypes

xforms:email

For e-mail adresses

xforms:ID-card-number

For credit cards and other ID cards

Also-Empty datatypes

<bind nodeset="q" required="true()" type="xsd:integer"/>

is now

<bind nodeset="q" required="true()" type="xforms:integer"/>

1.3 Submission

The first submission element is now the default, so if you only have one submission a submit control doesn't need to specify it.

1.3.1 Submission: attributes

To control submission more, the <submission> element now has a number of new attributes and child elements.

Attributes:

  • resource: same as action (see element)

  • mode (asynch, synch): asyncronous or synchronous submission. Asynchronous is default.

  • method="delete": supports http DELETE method.

  • verb: overrides the method attribute

  • serialize: whether data is to be sent with the submission

  • validate: whether to validate the data (for instance for save to file)

  • relevant: whether to prune non-relevant data

  • replace="text": accept text results, and replacing parts of instance

  • replace="text": accept text results, and replacing parts of instance

  • target: used with replace="text

1.3.2 Submission: elements

resource

Allows you to get submission URI from an instance. Overrides the action attribute.

verb

Likewise allows you to specify the method in an instance.

header

Allows you to add headers to the submission

1.3.3 Submission for Soap

Better support for soap submission

1.4 Events

New events:

  • xforms-submit-serialize

  • xforms-version-exception

  • xforms-output-error

1.5 New Functions

1.5.1 Encoding and decoding functions

1.5.2 Control functions

1.6 Controls

1.7 Actions

1.7.1 Actions: insert and delete

insert action improved

delete action improved

1.7.2 Conditional and repeated actions

<delete if="XPath Expression" .../>

<delete while="XPath Expression" .../>

On all actions

1.7.3 New attribute on dispatch action

<dispatch delay="1000" ... /> allows polling.

1.7.4 Additions to actions

dispatch+name child element

dispatch+target child element

dispatch+delay child element

setfocus+control child element

load+resource child