W3C

XForms 1.0 Frequently Asked Questions

W3C Forms Working Group

Abstract

This document is being put together by the members of the W3C XForms Working Group as a repository of Frequently Asked Questions.

Table of Contents

[@@todo]

XForms

What are the advantages of XForms?

Here are the primary benefits:

XForms improves the user experience
XForms has been designed to allow much to be checked by the browser, such as types of fields being filled in, or that one date is later than another. This reduces the need for round trips to the server or for extensive script-based solutions, and improves the user experience by giving 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 inital data, and can submit the results as XML. By including the user in the XML pipeline, it at last means you can have end-to-end XML, right up to the user's desktop.
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 Schemas for defining data types. This has a dual benefit: ease of learning for people who already know these technologies, and the potential for implementors to use off-the-shelf components to build their systems.
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 for blind users) as with traditional visual browsers.
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 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, adaptive, forms, without having to resort to scripting.

What can I do with XForms that I can't do with old HTML Forms?

XForms can do everything that HTML Forms can do, and then some. In particular XForms lets you:

Is XForms more complicated than HTML Forms?

No. The XForms Recommendation may make it look complicated, but is not designed as a tutorial on XForms; it is addressed to implementors who need to know exact details about how to implement XForms, and so is very detailed.

The same form written in HTML Forms and XForms looks pretty much the same. It is when you start to design forms that HTML wasn't designed to handle that XForms starts to become much simpler. So XForms contains things that HTML Forms doesn't, but that is in order to make forms creation simpler.

Will we have to wait for new browsers?

No. There are already several implementations that let you use XForms with existing browsers, either with plugins or by transforming the forms at the server, as well as a number of browsers that implement XForms natively.

There is a list of XForms Implementations that contains details of many of these implementations; an editorial review including screen shots of some of them, can be found at xml.com.

Will XForms work on PDA's and mobile phones?

At the time of writing XForms has been demonstrated on PDAs and mobile phones using proxies, using the same techniques that are often used to present web content on smaller devices. We anticipate that native XForms clients will appear on mobile devices soon.

What servers (currently) support XForms?

All of them! XForms has several new submission methods compared with HTML Forms, but these are all standard HTTP methods for sending data over the network. XForms can use 'PUT' to put data to a server, can talk to a SOAP or XML RPC server, but also supports legacy formats allowing forms to work with all existing forms servers.

What extension should I give my file ("form.xform"?) and what MIME type should I give it?

XForms is not a host language, but is designed to be integrated into any suitable XML markup, including XHTML and SVG. As a consequence, XForms does not have a file extension or MIME type of its own: you use what ever the host language requires.

Who is backing XForms?

The XForms working group that created XForms contains representatives from many major computing companies; see the press-release and testimonials about XForms for details. On top of this there are a large number of implementations emerging. In fact XForms is the most-implemented W3C specification ever at this stage in its life-cycle!

Some large user populations are beginning to emerge, including the British Government's e-government initiative, a country's tax service, and a country's insurance industry.

Why does XForms use a completely new Events system?

It doesn't. It uses DOM Events which is the exactly the same eventing system used by HTML and many other web applications. However, in HTML the only way you can use it is via scripting, while in XForms it is exposed in the markup via the use of XML Events. This allows you to do many event-based actions without having to resort to scripting.

What about InfoPath?

InfoPath is the name for Microsoft's forms solution within Office 11. It does not use XForms since there appears to be no expectation that users will want to edit or otherwise maintain Office-11 created electronic forms with anything other than Office-11 tools. Thus, InfoPath promises functionality similar to that offered by XForms 1.0 with respect to creating online forms that edit and submit XML documents; relying on XForms-based solutions for achieving equivalent functionality has the advantage of being able to create, edit, maintain and deploy the resulting online form without being permanently tied to a single vendor.

Is it true that XForms was delayed because of an argument?

No. The report that this was so was an apparent misunderstanding by a journalist of how the W3C Recommendation process works.

There is a detailed response from XForms WG Chair Steven Pemberton regarding this.

What about editors?

Do I need scripting?

Are there books?

Are there other resources?

What's next?

2. Technical Questions

Why isn't my XForms working?

Do I need to put id on every element?

How do I use <select> on structures?

How do I copy structures?

How do I do hidden controls?

Why doesn't my control show up?

How can I use the same model in multiple documents? (Answer xinclude)

Why do you need a <select> and a <select1>; couldn't you have just put an attribute on <select> like they did in HTML?