[XForms] Xforms or XHTML 1.0 Forms Module

christof.hoeke at e-7.com christof.hoeke at e-7.com
Tue Feb 8 05:35:57 EST 2005

A question regarding which forms dialect to choose as a basis for a web application processing framework.

We developed a custom XML format to be used to describe and process (web) forms which itself is part of a custom XML format basically describing (web) pages and a processing/workflow part.
For the frontend it is transformed via XSLT to HTML/CSS to target desktop browsers (may later also be PDA or whatever). So the format has to include enough information for a semantically sufficient processing in it (accessibility is an issue). The layout information is in the enclosing format.
For the backend the same format is used for a kind of basic workflow and of course the processing of the input data (delegation to other applications, storing, validation etc).

For the next version currently in development the format needs to be changed anyway (not the best yet as it is more or less a pure layout format yet and not even complete regarding all form possibilities [grouping of option elements etc]). 
So we thought of using a standard format for the forms part of the format (which currently cannot be changed as a whole as it is also used for CMS generated static pages and which should not be needed anyway if just adding forms as a module). 

Anyway, we looked into Xforms (XTHML 2.0 forms) but wondered if they bring enough advantages compared to the second option, using simply XHTML 1.0 Forms.

- new format, needs to be learned and implemented, higher learning curve+ new standard and therefore possibly more futureproove format
- for basic layout information maybe label needing to be child of input (is this actually mandatory?) cannot easily be transformed to the HTML <label for="ID"> <input id="ID"> possibility
+ includes validation and separation of model and view
... Lots more of course

XHTML 1.0 Forms:
+ lots of experience, known format and fairly simple, easy to use
+ of course includes all elements we need for a transformation to HTML (fieldset/legend, input+label, @accesskey, @tabindex etc)
- validation/data-types and other stuff needs to be added with custom or Xforms parts

Maybe we don't yet understand Xforms right, but at the moment we tend to use XHTML 1.0 forms for the following reasons/questions, maybe anyone can share his opinions?
* can Xforms describe *all* possible HTML form elements without the need to add custom extensions? 
	* above <label for="ID"> <input id="ID"> example which seems difficult in XForms
	* fieldset/legend elements, select/optgroup/option elements etc
* submitting XML from the browser does not work yet so this part of Xforms would have to be committed anyway
* new widgets (range widget) cannot be used on browsers yet either
* workload to integrate Xforms compared to XHTML 1.0 forms seems much higher 
* later migration to xforms should not be too difficult

Any opinions would be great, thanks a lot 

More information about the Xforms mailing list