W3C

XForms 1.0

W3C Working Draft 18 January 2002

This version:
http://www.w3.org/TR/2002/WD-xforms-20020118 (single HTML file, diff-marked HTML, PDF, Zip archive)
Latest version:
http://www.w3.org/TR/xforms/
Previous version:
http://www.w3.org/TR/2001/WD-xforms-20011207
Editors:
Micah Dubinko, Cardiff <mdubinko@Cardiff.com>
Josef Dietl, Mozquito Technologies <josef@mozquito.com>
Leigh L. Klotz, Jr., Xerox Corporation <Leigh.Klotz@pahv.xerox.com>
Roland Merrick, IBM <Roland_Merrick@uk.ibm.com>
T. V. Raman, IBM <tvraman@almaden.ibm.com>

Abstract

XForms is an XML application that represents the next generation of Forms for the Web. By splitting traditional XHTML forms into three parts - data 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.

Status of this Document

Last Update: $Date: 2017/10/02 10:26:14 $

This section describes the status of this document at the time of its publication. Other documents may supersede this document. The latest status of this document series is maintained at the W3C.

This is a W3C Last Call Working Draft of the XForms 1.0 specification, for review by W3C members and other interested parties. The Last Call review period ends on 22 February 2002 at 2359Z. Please send review comments before the end of the review period to www-forms-editor@w3.org. This list is archived at http://lists.w3.org/Archives/Public/www-forms-editor/.

Following completion of Last Call, the XForms Working Group has agreed to advance the specification according to the following exit criteria:

  1. Sufficient reports of implementation experience have been gathered to demonstrate that XForms processors based on the specification are implementable and have compatible behavior.

  2. An implementation report shows that there is at least one implementation of each feature.

  3. Formal responses to all comments received by the Working Group.

If these criteria are met, the specification will advance to Proposed Recommendation, otherwise the specification will enter a Candidate Recommendation phase to ensure that the above criteria are met.

This document is a W3C Working Draft for review by W3C members and other interested parties. It is a draft document and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use W3C Working Drafts as reference material or to cite them as other than "work in progress". A list of current public W3C Working Drafts can be found at http://www.w3.org/TR.

This document has been produced as part of the W3C HTML Activity.

Please send detailed comments on this document to www-forms@w3.org, the public forum for discussion of the W3C's work on web forms. To subscribe, send an email to the above address with the word subscribe in the subject line (include the word unsubscribe if you want to unsubscribe). The archive for the list is accessible online.

Table of Contents

1 About the XForms 1.0 Specification
    1.1 Background
    1.2 Reading the Specification
    1.3 How the Specification is Organized
    1.4 Documentation Conventions
2 Introduction to XForms
    2.1 Separating Purpose From Presentation
    2.2 Current Approach: HTML
    2.3 Transition to XForms
    2.4 Providing XML Instance Data
    2.5 Constraining Values
    2.6 Multiple Forms per Document
3 Document Structure
    3.1 The XForms Namespace
    3.2 Horizontally Applicable Markup
    3.3 Model
    3.4 instance
    3.5 schema
    3.6 submitInfo
    3.7 privacy
    3.8 XForms and XLink
        3.8.1 XLink Conformance and Examples
4 Processing Model
    4.1 Events Overview
    4.2 Initialization Events
        4.2.1 xforms:modelConstruct
        4.2.2 xforms:modelInitialize
        4.2.3 xforms:initializeDone
        4.2.4 xforms:UIInitialize
        4.2.5 xforms:formControlInitialize
    4.3 Interaction Events
        4.3.1 DOM Mutation Events
        4.3.2 xforms:next and xforms:previous
        4.3.3 xforms:focus and xforms:blur
        4.3.4 xforms:activate
        4.3.5 xforms:valueChanging
        4.3.6 xforms:valueChanged
        4.3.7 xforms:scrollFirst
        4.3.8 xforms:scrollLast
        4.3.9 xforms:insert and xforms:delete
        4.3.10 xforms:select and xforms:deselect
        4.3.11 xforms:help and xforms:hint
        4.3.12 xforms:alert
        4.3.13 xforms:valid
        4.3.14 xforms:invalid
        4.3.15 xforms:refresh
        4.3.16 xforms:revalidate
        4.3.17 xforms:recalculate
        4.3.18 xforms:reset
    4.4 XForms Submit
        4.4.1 xforms:submit
        4.4.2 application/x-www-form-urlencoded
        4.4.3 multipart/form-data
        4.4.4 text/xml
            4.4.4.1 Binary Content
    4.5 Error Indications
        4.5.1 xforms:schemaConstraintsError
        4.5.2 xforms:traversalError
        4.5.3 xforms:invalidDatatypeError
5 Datatypes
    5.1 XML Schema Built-in Datatypes
    5.2 XForms Datatypes
        5.2.1 xforms:listItem
        5.2.2 xforms:listItems
6 Constraints
    6.1 XForms Constraints
        6.1.1 type
        6.1.2 readOnly
        6.1.3 required
        6.1.4 relevant
        6.1.5 calculate
        6.1.6 isValid
        6.1.7 maxOccurs
        6.1.8 minOccurs
    6.2 Schema Constraints
        6.2.1 Atomic Datatype
    6.3 Additional Schema Examples
        6.3.1 Closed Enumeration
        6.3.2 Open Enumeration
        6.3.3 Union
        6.3.4 Lists
    6.4 Binding
        6.4.1 bind
        6.4.2 Rules For Binding Expressions
        6.4.3 Binding References
7 XPath Expressions in XForms
    7.1 XPath Datatypes
    7.2 Instance Data
    7.3 Evaluation Context
    7.4 XForms Core Function Library
        7.4.1 Boolean Methods
            7.4.1.1 boolean-from-string()
            7.4.1.2 if()
        7.4.2 Number Methods
            7.4.2.1 avg()
            7.4.2.2 min()
            7.4.2.3 max()
            7.4.2.4 count-non-empty()
            7.4.2.5 cursor()
        7.4.3 String Methods
            7.4.3.1 property()
            7.4.3.2 now()
        7.4.4 Extension Functions
8 Form Controls
    8.1 input
    8.2 secret
    8.3 textarea
    8.4 output
    8.5 upload
    8.6 range
    8.7 button
    8.8 submit
    8.9 selectOne
    8.10 selectMany
    8.11 Common Markup for selection controls
        8.11.1 choices
        8.11.2 item
        8.11.3 itemset
        8.11.4 value
    8.12 Common Markup
        8.12.1 Common Attributes
        8.12.2 Single Node Binding Attributes
        8.12.3 Nodeset Binding Attributes
        8.12.4 Common Child Elements
            8.12.4.1 caption
            8.12.4.2 help
            8.12.4.3 hint
            8.12.4.4 alert
            8.12.4.5 extension
9 XForms User Interface
    9.1 group
    9.2 switch
    9.3 repeat
        9.3.1 Repeat Processing
        9.3.2 Nested Repeats
        9.3.3 User Interface Interaction
10 XForms Actions
    10.1 dispatch
    10.2 refresh
    10.3 recalculate
    10.4 revalidate
    10.5 setFocus
    10.6 loadURI
    10.7 setValue
    10.8 submitInstance
    10.9 resetInstance
    10.10 setRepeatCursor
    10.11 insert
    10.12 delete
    10.13 toggle
    10.14 script
    10.15 message
    10.16 action
11 Conformance
    11.1 Conformance Levels
        11.1.1 XForms Basic
        11.1.2 XForms Full
    11.2 Conformance Description
        11.2.1 Conforming XForms Processors
        11.2.2 Conforming XForms Documents
        11.2.3 Conforming XForms Generators
12 Glossary Of Terms

Appendices

A Schema for XForms
    A.1 Schema for XLink
    A.2 Schema for XML Events
B References
    B.1 Normative References
    B.2 Informative References
C Recalculation Sequence Algorithm
    C.1 Details on Creating the Master Dependency Directed Graph
    C.2 Details on Creating the Pertinent Dependency Subgraph
    C.3 Details on Computing Individual Vertices
    C.4 Example of Calculation Processing
D Input Modes
    D.1 inputMode Attribute Value Syntax
    D.2 User Agent Behavior
    D.3 List of Tokens
        D.3.1 Script Tokens
        D.3.2 Modifier Tokens
    D.4 Relationship to XML Schema pattern facets
    D.5 Examples
E Complete XForms Examples
    E.1 XForms In XHTML
    E.2 Editing Hierarchical Bookmarks Using XForms
F Changelog (Non-Normative)
G Acknowledgments (Non-Normative)
H Production Notes (Non-Normative)