CP RSS Channel
About Our Sponsors
Articles & Papers
Technology and Society
|XForms 1.0 Third Edition Published as a W3C Recommendation.
W3C has announced the publication of XForms 1.0 (Third Edition) as a W3C Recommendation, signifying that there is significant support for the specification from the Advisory Committee, the W3C Team, W3C Working groups, and the public.
Forms are an important part of the Web, and they continue to be the primary means for enabling interactive Web applications. Web applications and electronic commerce solutions have sparked the demand for better Web forms with richer interactions. XForms 1.0 is the response to this demand, and provides a new platform-independent markup language for online interaction between a person (through an XForms Processor) and another agent, usually remote.
XForms is an XML application that represents the next generation of forms for the Web. It splits traditional XHTML forms into three parts: XForms model, instance data, and user interface. By this means, XForms separates presentation from content, allows reuse, and provides strong typing. This design reduces the number of round-trips to the server, and offers device independence with a reduced need for scripting. XForms 1.0 XForms strives to improve authoring, reuse, internationalization, accessibility, and overall usability.
The XForms Recommendation document responds to implementor feedback, brings the XForms 1.0 Recommendation up to date with second edition errata, and reflects clarifications already implemented in XForms processors. W3C reports that the Recommendation-level specification contains 343 diffs that have significantly hardened XForms for enterprise deployment. The XForms 1.0 Third Edition Test Suite was used in interoperability testing, including tests for : Document Structure; Processing Model; Datatypes; Model Item Properties; XPath Expressions in XForms; Form Controls; XForms User Interface; XForms Actions; Submit Function; XForms and Styling. More than twenty-five (25) XForms Implementations were reported as of 2007-10-29.
XForms has been designed on the basis of several years' experience with HTML forms. HTML Forms have formed the backbone of the e-commerce revolution, and having shown their worth, have also indicated numerous ways they could be improved. The primary difference when comparing XForms with HTML Forms, apart from XForms being in XML, is the separation of the data being collected from the markup of the controls collecting the individual values. By doing this, it not only makes XForms more tractable by making it clear what is being submitted where, it also eases reuse of forms, since the underlying essential part of a Form is no longer irretrievably bound to the page it is used in.
A second major difference is that XForms, while designed to be integrated into XHTML, is no longer restricted only to be a part of that language. XForms is thus not a free-standing document type, but is intended to be integrated into other markup languages such as SVG.
Within the W3C Forms Working Group, related forms specifications are being developed. XForms 1.1, at Last Call Working Draft level, "refines the XML processing platform introduced by XForms 1.0 by adding several new submission capabilities, action handlers, utility functions, user interface improvements, and helpful datatypes as well as a more powerful action processing facility, including conditional, iterated and background execution, the ability to manipulate data arbitrarily and to access event context information.
Web Forms 2.0 "defines extension to the forms features found in HTML4's Forms chapter and the corresponding DOM2 HTML interfaces. Web Forms 2.0 applies to both HTML and XHTML user agents. It provides new strongly-typed input fields, new attributes for defining constraints, a repeating model for declarative repeating of form sections, new DOM interfaces, new DOM events for validation and dependency tracking, and XML submission and initialization of forms. It also standardizes and codifies existing practice in areas that have not been previously documented, and clarifies some of the interactions of HTML form controls and CSS."
XForms Transitional will address backwards compatibility with classic HTML Forms, providing the ability to process classic HTML forms while retaining an underlying XForms processing architecture. It will be integrated into the XForms architecture, following design principles such as the separation of presentation from content. This new XForms Transitional deliverable will be able to read both the new XHTML Forms and also XForms 1.0.
XForms 1.0 (Third Edition). Edited by John M. Boyer (IBM). W3C
Recommendation 29-October-2007. This version URI: http://www.w3.org/TR/2007/REC-xforms-20071029/. Latest version URI: http://www.w3.org/TR/xforms/. Previous version URI: http://www.w3.org/TR/2007/PER-xforms-20070725/. Previous Editors: John M. Boyer (IBM - XForms 1.0 Second Edition), Micah Dubinko (Cardiff Software - XForms 1.0 First Edition), Leigh L. Klotz, Jr. (Xerox Corporation - XForms 1.0 First Edition), David Landwehr (Novell - XForms 1.0 Second Edition), Roland Merrick (IBM - XForms 1.0 First and Second Editions), T. V. Raman (Google - XForms 1.0 First and Second Editions). See also the diff-marked HTML format version (color-coded for new, added text, changed text, and deleted text).
Status: XForms 1.0 (Third Edition) supersedes XForms 1.0 Second Edition (W3C Recommendation 14-March-2006). The document has been produced by the W3C Forms Working Group as part of the Forms Activity within the W3C Interaction Domain. The authors of the document are the Forms Working Group participants.
Document Approval: The document has been reviewed by W3C Members, by software developers, and by other W3C groups and interested parties, and is endorsed by the Director as a W3C Recommendation. It is a stable document and may be used as reference material or cited from another document. W3C's role in making the Recommendation is to draw attention to the specification and to promote its widespread deployment. This enhances the functionality and interoperability of the Web.
Document Production Notes: "This document was encoded in the XMLspec DTD v2.6 (available as a RELAX NG Grammar or in the RNG compact syntax, a W3C XML Schema, or a DTD). The XML sources were transformed using diffspec and xmlspec stylesheets, version 2.6. The XML Schema portion of the Appendix was rendered into HTML with the xmlverbatim XSLT stylesheet, used with permission. The primary tool used for editing was XMLSpy. The XML was transformed using the XSLT processor in Java 6. The editor(s) use the W3C CVS repository and the W3C IRC server for collaborative authoring." [from Non-Normative Appendix J]
Adapted from the XForms 1.0 (Third Edition) Introduction — here is a summary of the primary benefits of using XForms:
Strong typing: Submitted data is strongly typed and can be checked using off-the-shelf tools. This speeds up form filling since it reduces the need for round trips to the server for validation.
XML submission: This obviates the need for custom server-side logic to marshal the submitted data to the application back-end. The received XML instance document can be directly validated and processed by the application back-end.
Existing schema re-use: This obviates duplication, and ensures that updating the validation rules as a result of a change in the underlying business logic does not require re-authoring validation constraints within the XForms application.
External schema augmentation: This enables the XForms author to go beyond the basic set of constraints available from the back-end. Providing such additional constraints as part of the XForms Model enhances the overall usability of the resulting Web application.
Internationalization: Using XML 1.0 for instance data ensures that the submitted data is internationalization ready.
Enhanced accessibility: XForms separates content and presentation. User interface controls encapsulate all relevant metadata such as labels, thereby enhancing accessibility of the application when using different modalities. XForms user interface controls are generic and suited for device-independence.
Multiple device support: The high-level nature of the user interface controls, and the consequent intent-based authoring of the user interface makes it possible to re-target the user interaction to different devices.
Less use of scripting: By defining XML-based declarative event handlers that cover common use cases, the majority of XForms documents can be statically analyzed, reducing the need for imperative scripts for event handlers.
XForms Model: In the XForms approach, forms are comprised of a section that describes what the form does, called the XForms Model, and another section that describes how the form is to be presented. In one example, it might be clear that we are collecting a value that represents whether cash or credit card is being used, and if a credit card, its number and expiration date. This can be represented in the XForms 'model' element, which in XHTML would typically be contained within the head section. XForms 1.0 defines a device-neutral, platform-independent set of form controls suitable for general-purpose use. The controls are bound to the XForms Model via the XForms binding mechanism, for example using the 'ref' attribute on the controls. In XHTML, this markup would typically appear within the body section...
Providing XML Instance Data: The XForms Processor can directly submit the data collected as XML. XForms processing keeps track of the state of the partially filled form through this instance data. Initial values for the instance data may be provided or left empty as in the example. Element instance essentially holds a skeleton XML document that gets updated as the user fills out the form. It gives the author full control on the structure of the submitted XML data, including namespace information. When the form is submitted, the instance data is serialized as an XML document.
Constraining Values: XForms allows data to be checked for validity as the form is being filled. In the absence of specific information about the types of values being collected, all values are returned as strings, but it is possible to assign types to values in the instance data. In one example, 'number' should accept digits only, and should have between 14 and 18 digits and expiry should accept only valid month/date combinations. Furthermore, in that example, the credit card information form controls for number and expiry are only relevant if the "cc" option is chosen for method, but are required in that case. By specifying an additional component, model item properties, authors can include rich declarative validation information in forms. Such information can be taken from XML Schemas as well as XForms-specific additions, such as relevant. Such properties appear on bind elements, while Schema constraints are expressed in an XML Schema fragment, either inline or external.
Multiple Forms per Document: XForms processing places no limits on the number of individual forms that can be placed in a single containing document. When a single document contains multiple forms, each form needs a separate model element, each with an 'id' attribute so that they can be referenced from elsewhere in the containing document. In addition, form controls should specify which model element contains the instance data to which they bind. This is accomplished through a model attribute that is part of the binding attributes...
XForms 1.1. Edited by John M. Boyer (IBM). W3C Last Call Working Draft. 22-February-2007. Latest version URI: http://www.w3.org/TR/xforms11/. A first Public Working Draft of XForms 1.1 was released on 15-November-2004. "XForms 1.1 refines the XML processing platform introduced by XForms 1.0 by adding several new submission capabilities, action handlers, utility functions, user interface improvements, and helpful datatypes as well as a more powerful action processing facility, including conditional, iterated and background execution, the ability to manipulate data arbitrarily and to access event context information. XForms is not a free-standing document type, but is intended to be integrated into other markup languages, such as XHTML or SVG. An XForms-based web form gathers and processes XML data using an architecture that separates presentation, purpose and content. The underlying data of a form is organized into instances of data schema, though formal schema definitions are not required..."
Web Forms 2.0. Edited by Ian Hickson (Google, Inc). W3C Working Draft. 21-August-2006. Latest Version URI: http://www.w3.org/TR/web-forms-2/. This specification defines Web Forms 2.0, an extension to the forms features found in HTML4's Forms chapter and the corresponding DOM2 HTML interfaces. Web Forms 2.0 applies to both HTML and XHTML user agents. It provides new strongly-typed input fields, new attributes for defining constraints, a repeating model for declarative repeating of form sections, new DOM interfaces, new DOM events for validation and dependency tracking, and XML submission and initialization of forms. It also standardizes and codifies existing practice in areas that have not been previously documented, and clarifies some of the interactions of HTML form controls and CSS. HTML4, XHTML1.1, and the DOM are thus extended in a manner that has a clear migration path from existing HTML forms, leveraging the knowledge authors have built up with their experience with HTML so far..."
XForms Transitional. The chartered work items will address backwards compatibility with classic HTML Forms by creating an XForms Transitional, which is syntactically a superset of classic HTML forms. XForms Transitional can thus process classic HTML forms while retaining an underlying XForms processing architecture. It is a goal that this work, which will be conducted in a task force jointly with the HTML WG, draw on the Web Forms 2 work (which moves from the Web Application Formats Working Group to the HTML Working Group) and be integrated into the XForms architecture (following design principles such as the separation of presentation from content). This new XForms Transitional deliverable will be able to read both the new XHTML Forms and also XForms 1.0. It will offer a smooth upgrade path towards XForms, and will degrade to existing XHTML forms with well-defined results. Documents using the 'tag soup' serialization of the new HTML are expected to be converted to the equivalent XML serialization).
XForms 1.0 Basic Profile. Edited by Micah Dubinko and T. V. Raman. W3C Candidate Recommendation. 14-October-2003. "The XForms Basic Profile describes a minimal level of XForms processing tailored to the needs of constrained devices and environments. A variety of devices, with widely varying characteristics and capabilities, have the potential to support XForms 1.0. XForms 1.0 defines a conformance profile called XForms Full, suitable for more powerful forms processing, and including processing from several other W3C specifications. This document defines a more limited conformance profile, called XForms Basic. Note that XForms Basic is a conformance profile for XForms Processors only. A new conformance level is not defined or needed for XForms Documents or XForms Generators. There is only one class of XForms document, with more advanced XForms Processors providing an enhanced experience for end users, for example by providing additional client-side validations..."
Tutorial: XForms for HTML Authors, Part 1. By Steven Pemberton (W3C/CWI). Version date: 2007-02-23 or later. See also XForms for HTML Authors, Part 2. "XForms is the new markup language for forms on the Web. This document is a quick introduction to XForms for HTML Forms authors. It shows you how to convert existing forms to their XForms equivalent. It assumes knowledge of HTML Forms, so is not a beginner's tutorial. Although there is mention of additional facilities of XForms beyond those possible in HTML Forms (marked with an asterisk on the headings), it is not a full tutorial on all features of XForms. Part 2 deals with additional features that are not available in HTML Forms."
From the W3C Forms Working Group Charter:
The mission of the Forms Working Group, part of the XForms Activity, is to develop specifications to cover forms on the Web, producing a system that scales from low-end devices through to the enterprise level.
A key idea in all the Forms work is separating the user interface and presentation from the logic and model, allowing the same form to be used without change on a wide variety of devices such as voice browsers, handhelds, desktops and even paper. XForms allows much more checking and calculation to be done on the client without resorting to scripting, before the form is submitted to the server. This increases security, provides the user with a much better experience, and reduces the need for repeated client-server cycles. XForms brings the benefits of XML to Web forms, transferring form data as XML.
Through declarative markup XForms reduces the need for scripting, which makes forms easier to author and aids device independence and accessibility; XForms makes it easier to achieve the desired layout of form fields without having to resort to using nested tables etc., which again aids device independence and accessibility.
Forms Annotations for Web Authentication are extensions to Web forms that would enable user agents to reliably recognize Web forms that are used for the entry of credentials and could hence support user agents in the generation and management of credentials. Similar extensions could be used to extract parameters for protocol-level authentication mechanisms from form controls.
XForms are designed to be used with a variety of host languages, including (but not limited to) XHTML. The Working Group will demonstrate that XForms can be used with multiple host languages, such as XHTML, XSL, and SVG; and that XForms Transitional can in addition be used with non-XML 'classic HTML'.
The Working Group will meet the requirements for the next generation of Web forms, both mobile and desktop.
- Advancing XForms 1.1 and XForms Basic 1.1 along the Recommendation Track
- Working on a new deliverable, XForms 1.2
- As part of a task force with the HTML WG, advancing XForms Transitional along the Recommendation Track
- Advancing Form Annotations for Web Authentication along the Recommendation track, using forms extensions, forms annotations, or a mix of both as seems desirable
- Maintenance of the XForms 1.0 specification, errata management, publication of revisions as appropriate.
- Use case and requirements gathering
- Creation and maintenance of a Test Suites for all deliverables on the Recommendation track which have conformance criteria
- Monitoring implementation of and conformance to Recommendations, interoperability reports
- The Working group may organize workshops or interoperability meetings as appropriate
XForms Transitional will combine the ease of authoring and backwards-compatibility advantages of Web Forms 2 with the underlying semantic structure and internationalization advantages of XForms, by utilizing an implicit, flat (rather than explicit) data model. It will be backwards compatible with classic HTML forms (in their XML serialization), of which it is syntactically a superset, and upwards compatible with XForms architecture; XForms processors are expected to handle XForms Transitional.
The Group will ensure that validation tools are available, possibly from third parties, for the XForms specifications. Validation does not mean DTD validation; validation using schemas (such as W3C XML Schema, RelaxNG, Schematron) and validation which is tolerant of extensions in other namespaces (for example using NVDL) is encouraged, as well as automated checking of items from the specification prose.
- XForms 1.0 (Third Edition). W3C Recommendation 29-October-2007. See also the diff-marked HTML format version (color-coded for new, added text, changed text, and deleted text).
- XForms 1.0 Third Edition Recommendation Errata, with a non-normative diff-marked version. Edited by John M. Boyer (IBM). There are no errata [as of 2007-10-30]. Compare: XForms 1.0 Second Edition Recommendation Errata (July 19, 2007).
- W3C news item
- Normative XML Schema for XForms
- XForms Specification Examples. Non-Normative Appendix G of the Recommendation ("Complete XForms Examples") also presents complete XForms examples.
- XForms 1.0 3rd Edition Test Suite. Introduction to XForms; Document Structure; Processing Model; Datatypes; Model Item Properties; XPath Expressions in XForms; Form Controls; XForms User Interface; XForms Actions; Submit; XForms and Styling; Complete XForms Examples.
- XForms Implementations. More than twenty-five (25) implementations were reported as of 2007-10-29.
- Online XForms Validator — from the XForms Institute. The validator is an interactive, Python-powered validator of XForms documents of all sorts; it works with multiple host languages.
- Mailing lists:
- General W3C XForms Resources:
- Other Resources:
- XForms Evening Sessions at XML 2007. See the summary: Seven presentations on XForms were scheduled for Monday, December 03, 2007 at the XML 2007 Conference and Exposition in Boston, Massachusetts, USA.
|Receive daily news updates from Managing Editor, Robin Cover.