W3C

XForms 1.0

W3C Working Draft 07 December 2001

This version:
http://www.w3.org/TR/2001/WD-xforms-20011207 (One big file, diff-marked HTML, Zip archive)
Latest version:
http://www.w3.org/TR/xforms/
Previous version:
http://www.w3.org/TR/2001/WD-xforms-20010828
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

Forms were introduced into HTML in 1993. Since then they have become a critical part of the Web. The existing mechanisms in HTML for forms are now outdated, and the W3C started work on developing an effective replacement. This document defines "XForms", W3C's name for the next generation of web forms.

Status of this Document

Last Update: $Date: 2001/12/06 22:53:54 $

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 Working Draft that incorporates new material agreed upon at the Mountain View face to face meeting and ongoing feedback from the general public. According to our current plan, the next Working Draft after this one will be a "Last Call" Working Draft. Interested parties are encouraged to provide additional feedback and comments.

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 Purpose and 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
    2.7 Complete Document
3 Terminology
4 Document Structure
    4.1 The XForms Namespace
    4.2 Horizontally Applicable Markup
    4.3 XForms Head Elements
        4.3.1 model
        4.3.2 instance
        4.3.3 schema
        4.3.4 submitInfo
        4.3.5 bind
        4.3.6 privacy
        4.3.7 action
        4.3.8 extension
    4.4 XForms and XLink
        4.4.1 XLink Conformance and Examples
5 Datatypes
    5.1 XML Schema Built-in Datatypes
    5.2 XForms Datatypes
        5.2.1 listItem
        5.2.2 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 Binding Constraints
        6.4.3 Binding References
7 XPath Expressions in XForms
    7.1 Datatypes
    7.2 Instance Data
    7.3 Evaluation Context
    7.4 Forms 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()
8 Form Controls
    8.1 input
    8.2 textarea
    8.3 secret
    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 Actions
    9.1 dispatch
    9.2 refresh
    9.3 recalculate
    9.4 revalidate
    9.5 setFocus
    9.6 loadURI
    9.7 setValue
    9.8 submitInstance
    9.9 resetInstance
    9.10 setRepeatCursor
    9.11 insert
    9.12 delete
    9.13 toggle
    9.14 script
    9.15 message
    9.16 action
10 XForms User Interface
    10.1 Grouping Form Controls
    10.2 Conditional Constructs For Dynamic User Interfaces
    10.3 Repeating Structures
        10.3.1 Repeat Processing
        10.3.2 User Interface Interaction
11 Processing Model
    11.1 Events Overview
    11.2 Initialization Events
        11.2.1 xforms:modelConstruct
        11.2.2 xforms:modelInitialize
        11.2.3 xforms:initializeDone
        11.2.4 xforms:UIInitialize
        11.2.5 xforms:formControlInitialize
    11.3 Interaction Events
        11.3.1 DOM Mutation Events
        11.3.2 xforms:next and xforms:previous
        11.3.3 xforms:focus and xforms:blur
        11.3.4 xforms:activate
        11.3.5 xforms:valueChanging
        11.3.6 xforms:valueChanged
        11.3.7 xforms:scrollFirst
        11.3.8 xforms:scrollLast
        11.3.9 xforms:insert and xforms:delete
        11.3.10 xforms:select and xforms:deselect
        11.3.11 xforms:help and xforms:hint
        11.3.12 xforms:alert
        11.3.13 xforms:valid
        11.3.14 xforms:invalid
        11.3.15 xforms:refresh
        11.3.16 xforms:revalidate
        11.3.17 xforms:recalculate
        11.3.18 xforms:reset
    11.4 XForms Submit
        11.4.1 xforms:submit
        11.4.2 application/x-www-form-urlencoded
        11.4.3 multipart/form-data
        11.4.4 text/xml
            11.4.4.1 Binary Content
    11.5 Error Indications
        11.5.1 xforms:schemaConstraintsError
        11.5.2 xforms:traversalError
        11.5.3 xforms:invalidDatatypeError
12 Conformance
    12.1 Conformance Levels
        12.1.1 XForms Basic
        12.1.2 XForms Full
    12.2 Conformance Description
        12.2.1 Conforming XForms Processors
        12.2.2 Conforming XForms Containing Documents
        12.2.3 Conforming XForms Generators

Appendices

A Schema for XForms
    A.1 Schema for XLink
    A.2 Schema for XML Events
B Input Modes
    B.1 List of Possible Input Modes
        B.1.1 Questionable Values
        B.1.2 Excluded Values
C References
    C.1 Normative References
    C.2 Informative References
D Recalculation Sequence Algorithm (Non-Normative)
    D.1 Details on Creating the Master Dependency Directed Graph
    D.2 Details on Creating the Pertinent Dependency Subgraph
    D.3 Details on Computing Individual Vertices
    D.4 Example of Calculation Processing
E Changelog (Non-Normative)
    E.1 Changes to Chapter Document Structure
    E.2 Changes to Chapter Datatypes
    E.3 Changes to Chapter Constraints
    E.4 Changes to Chapter XPath Expressions in XForms
    E.5 Changes to Chapter Form Controls
    E.6 Changes to Chapter XForms Actions
    E.7 Changes to Chapter XForms User Interface
    E.8 Changes to Chapter Processing Model
    E.9 Changes to Chapter Conformance
    E.10 Changes to Appendix Schema for XForms
F Acknowledgments (Non-Normative)
G Production Notes (Non-Normative)