Table of Contents
The purpose of this tutorial is to provide the user with basic information about XForm Editor and XForms.
"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, usually remote, agent. XForms are the successor to HTML forms, and benefit from the lessons learned from HTML forms."
The following are the primary benefits:
XForms improves the user's experience.
XForms has been designed to allow many things to be checked by the browser, such as types of fields being filled in, if a particular field is required, or if one date is more current than another. This reduces the need for round trips to the server or for extensive script-based solutions. It also improves the user's experience by providing immediate feedback to what is being filled in.
It is XML, and it can submit XML.
XForms is properly integrated into XML: it is in XML, the data it collects in the form is XML, it can load external XML documents as initial data and can submit the results as XML. By including the user in the XML pipeline, end-to-end XML right up to the user's desktop is available.
It combines existing XML technologies.
Rather than reinventing the wheel, XForms uses a number of existing XML technologies, such as XPath for addressing and calculating values, and XML Schema for defining data types. This has a dual benefit: ease of learning for people who already know these technologies, and the ability for implementors to use off-the-shelf components to build their systems.
It is device independent.
The same form can be delivered without change to a traditional browser, a PDA, a mobile phone, a voice browser, and even some more exotic emerging clients, such as an Instant Messenger. This greatly eases the task of providing forms to a wide audience, since forms only need to be authored once.
It is easier to author complicated forms.
Because XForms uses declarative markup to declare properties of values and to build relationships between values, it is much easier for the author to create complicated, adaptable, forms, without having to resort to scripting.
It is internationalized.
Because the data submitted is XML, it is properly internationalized.
It is accessible.
XForms has been designed so that it will work equally well with accessible technologies (for instance, magnified browsers for visually-impaired users) as with traditional visual browsers.
Check data values while they are being typed in by the user.
Indicate that certain fields are required, and that the form cannot be submitted without these fields.
Submit forms data as XML.
Integrate with Web services, for example by using SOAP and XML RPC.
Submit the same form to different servers (for example, a search string to different search engines).
Save and restore values to and from a file.
Use the result of a submit as input to a further form.
Get the initial data for a form from an external document.
Calculate submitted values from other values.
Constrain values in certain ways, such as requiring them to be in a certain range.
Build 'shopping basket' and 'wizard' style forms without having to resort to scripting.