W3C home > Mailing lists > Public > public-appformats@w3.org > September 2006

Re: A forms-lite straw man

From: John Boyer <boyerj@ca.ibm.com>
Date: Tue, 5 Sep 2006 11:53:24 -0700
To: Dave Raggett <dsr@w3.org>
Cc: public-appformats@w3.org, public-appformats-request@w3.org, www-forms@w3.org
Message-ID: <OFB72078D2.EC8A1D15-ON882571E0.0065F1FF-882571E0.0067CE91@ca.ibm.com>
Hi Dave,

This is a good start.

I was also thinking that inputs should allow optional use of 'name' 
attribute instead of ref *and* label. This would allow implicit creation 
of a 'flat' data structure.

Then, I was thinking that an input could also use a value attribute 
(content string, not XPath) to indicate initial value of the named node in 
the implicit flat data model.

The point is that this:

<input name="Name" value="John"/>

would do the same thing as an XForm today would do with

   <xf:instance xmlns="">

<xf:input ref="Name">

Note that today XForms already reads the above xf:input and, if the model 
contains no instance, it will autogenerate one like the xf:instance above, 
except for the ability to initialize the data to something other than 
empty string.  So the main point here is that the name attribute could be 
an ultra-shorthand to further smooth the migration path, and that value 
would go even one step further along those lines.

I also agree that further details are needed for various other controls 
and their attributes, but seems best to take it one step at a time.

John M. Boyer, Ph.D.
Senior Product Architect/Research Scientist
Co-Chair, W3C XForms Working Group
Workplace, Portal and Collaboration Software
IBM Victoria Software Lab
E-Mail: boyerj@ca.ibm.com  http://www.ibm.com/software/

Blog: http://www.ibm.com/developerworks/blogs/page/JohnBoyer

Dave Raggett <dsr@w3.org> 
Sent by: public-appformats-request@w3.org
09/05/2006 04:06 AM

www-forms@w3.org, public-appformats@w3.org

A forms-lite straw man

Rising to Mark's challenge, here is a sketch of of a proposal that 
is both syntactic sugar for a subset of XForms and an incremental 
improvement on HTML4. The data model and contraints are implied 
by the annotations provided with the input fields.

Input fields have the following attributes:

   ref:  an XPath expression binding the field to the data
         e.g. ref="details/age"

   type: an enumerated value from a small set as per HTML4
         with the addition of {integer, number, date}

   verify: an XPath expression evaluating to a boolean

   pattern: a regular expression constraining the input value

   min, max and step: numbers acting as constraints with step
     being used for ranges

   required: an XPath expression evaluating to a boolean

   hint, help and alert: corresponding to XForms elements
             (use HTML4 label element for the label text)

Output fields have the following attribute

   value: an XPath expression evaluating to a string

Obviously there are many other details missing from the above,
e.g. initialization and submission, selection controls, repeating 
controls, and autocompletion etc. However, I hope it serves to 
indicate a potential way to blend ideas from both WF2 and XForms.

  Dave Raggett <dsr@w3.org>  W3C lead for multimodal interaction
  http://www.w3.org/People/Raggett +44 1225 866240 (or 867351)
Received on Tuesday, 5 September 2006 18:54:51 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:50:05 UTC