
Creating live XForms tutorials in Drupal

Specifying the submission URL and headers at run-time
Although submission was already a powerful feature of version 1.0 of XForms, there are a number of common use-cases that it was unable to support. For example, although it's easy for an XForms 1.0 form to request an RSS feed and to display the data with a repeat, it's not possible for the user to specify the feed location at run-time, perhaps by typing a URL into an input control, or selecting from a list.
XForms 1.1 has added a number of new features to submission to control the URL, request headers, location of returned data, and more, which together make it much easier to build forms that use servers based on REST, ATOM, SOAP, and WebDAV.

The differences between XForms 1.1 and XForms 1.0
The following is an overview of the new features and changed behaviors available in XForms 1.1. The text is taken from section 1.5 of the XForms 1.1 specification.
Model and Instance
The model element now must support a version attribute to help authors bridge the transition between XForms 1.0 to XForms 1.1.
Generating XForms from XML instance data
The Idea
One of the ideas we've had whilst developing XForms over the years has been to try and generate a form from a set of XML instance data. The following article takes a look at one attempt at doing this.
The main idea was that for every leaf node (a node with no children) in a set of XML instance data, we wanted to create an XForms input control and for every non-leaf node we'd create an XForms group control. The result would be that we'd have a very simple XForm that contained controls bound to the instance data.
The generation of the simple XForm we decided would be done with XSLT.
The Example

Understanding the XForms dependency-engine
Limit the maximum length of submitted data
Here's one way of many of making sure that user submitted data does not exceed a maximum allowed length (set by the form author) in a form control.
Say there's the scenario that requires you to ensure that when someone comments on your blog post, they do not enter more than 25 characters (you're not looking for detailed feedback on your post!).
The approach demonstrated here is to disable the button the user needs to press to submit their comment unless the text they enter is less than or equal to 25 characters. If they do enter more than that, we disable the button and inform them that they need to shorten their comment. It's also nice to let them know how many characters they have left to enter too.
Localise your forms
Building dynamically localised applications is a real cinch with XForms. This article describes one approach to doing it.
Building composite controls with switch, case and toggle
The XForms switch, case and toggle elements are often used to implement a tabbed view in complex applications. This article demonstrates how they can also be employed at a much finer granularity to build individual composite controls.
