You are reading O'Reilly XForms Essentials by Micah Dubinko. (What is this?) - Buy XForms Essentials Online

The History of XForms

After a number of internal and published requirements documents, the first XForms draft specification was published on April 6, 2000. The title of this document, "Datamodeling Proposal for XForms," gave a strong hint about how undeveloped this initial effort was. In fact, the final versions of the XForms specification bear no resemblance at all to this first attempt.

Why was this? At the time the initial XForms Working Draft was under development, another W3C specification called "XML Schema" was gradually progressing through the W3C channels. In what later proved to be a costly diversion, the XForms Working Group initially decided to make the XForms data types differ from the ones in XML Schema, "due to different usage scenarios and target audiences." As an alternative, the specification spelled out a "simple syntax," which consisted of a number of XML tags such as string, money, and group, where the tags needed to be nested in a structure that mirrored the desired shape of the final XML that would be submitted. For example, to submit XML that looked like:

<poll>
  <vote>Vanilla</vote>
</poll>

You would have needed an XForms "data model" such as this:

<xform>
  <group name="poll">
    <string name="vote">
  </group>
</xform>  

Although avoiding all traces of XML Schema was attractive to some, it proved to be more trouble than it was worth for a W3C specification. Thus, on August 15, 2000, a very brief Working Draft was published, containing not the XForms specification but, rather, the message: "The Working Group is currently studying how to support forms where the data model is defined by an XML Schema plus form specific properties. The previous version of the XForms Data Model is being obsoleted while this work is underway."

The December 2000 and February 2001 Working Drafts expanded on this new direction, and rolled into the document the XForms User Interface and other pieces that were initially conceived as separate specifications. (The final version of the specification defines modules that have much the same effect.) One other notable aspect of these documents is that they contain the first reference to the XForms Model, or the core definition of a form independent of any user interface. And, of course, XML Schema datatypes made their appearance, though simple syntax clung on as an extra section.

By the publication of the June 2001 Working Draft, people were starting to gain more experience with XForms authoring. With this experience came the realization that the simple syntax wasn't actually simplifying matters. The core problem was that the simple syntax was required to redundantly mirror the structure of the instance data, or initial XML used as form data, forcing authors in many cases to create the same structure twice in slightly different ways. Even worse, it created interoperability problems between XML-Schema-XForms and simple-syntax-XForms. So out went the simple syntax. XML Schema datatypes turned out to not be that bad after all, and the initial instance data itself held all the structural information needed. Things were starting to look up. In short, this Working Draft was the first to strongly represent the final XForms specification.

A few more publication cycles followed in August and December 2001. These updates consisted mostly of editorial work, though a few notable new features included script interfaces to interact with instance data and a cleaned-up processing model. This led the way for the January 2002 "Last Call" Working Draft, and the associated call for public review of XForms. In five weeks, the public mailing list for comments received around 150 substantive comments—each of which needed to be discussed and given a response. Comments ranged from the aesthetic ("please use only lowercase tag names") to the technical ("don't deprecate the HTTP GET method") to the political ("don't publish again until you have a test suite"). Often different submitters made contradictory requests. All in all, it took several months, and an additional publication in August 2002, for the XForms Working Group to sort through all of the advice, make the necessary changes, and send responses to each comment, as required by the W3C process.

Finally, in November 2002, the XForms Candidate Recommendation was released, along with a call for implementations. Strong support from business and open source implementers, collected at a meeting in February 2003, helped identify pieces of the specification that were hard to implement. As of this writing in August 2003, XForms has reached the Proposed Recommendation stage, and is poised to become a final W3C Recommendation shortly thereafter.