XForms is the new standard way to create forms (the specification is actually not that new, but it is definitely new to almost all developers, few of whom have ever used it). Understanding XForms a better understanding of the worlds of XML and XSL. XML is simply a way to share structured data. XML documents are each of a specific type which defines what fields and information need to be in XML documents of that type. XForms is an XML type used to define what forms contains. That is important to understand. Unlike HTML forms which contain form controls and presentation, XForms forms contain only form controls. Or put differently, forms contain controls (the form fields themselves) as well as presentation information (where the label should be displayed, HTML tables, and so on). An XForms form only contains controls, a list of controls and what their attributes are. Attributes include things like:
There is no presentation at all in the XForms, just lots of information that could be used by whomever (or whatever) needs to provide the presentation. XSL stands for Extensible Stylesheet Language, it is a language used to provide processing rules for XML. If you had an XML file containing raw movie information and you wanted to convert that data into the format your database needed, you would write an XSL file that provided the translation rules, defining how XML data is to be processed and what any generated output should look like. The XSL file is then applied, and the output you need is generated. When working with XForms you then need to document:
The big idea is to explicitly divorce form contents from form presentation. Why is this a good thing? Consider the following scenarios:
Barriers To XForms AdoptionsThere have been three primary barriers to XForms adoption:
All things considered, it is easy to see why XForms adoption has been slow. And yet XForms does indeed have value, as already explained. ColdFusion and XFormsColdFusion can't solve all of the above problems, but it can make using XForms far easier and more manageable:
NOTE If you intend to use XForms extensively, you'll want to pick up a book on XSL. |