W3C home > Mailing lists > Public > www-forms@w3.org > September 2006

Re: some technical thoughts about incremental improvements to forms

From: Lachlan Hunt <lachlan.hunt@lachy.id.au>
Date: Tue, 05 Sep 2006 01:30:51 +1000
Message-ID: <44FC46AB.6090309@lachy.id.au>
To: Dave Raggett <dsr@w3.org>
CC: www-forms@w3.org

Dave Raggett wrote:
> The HTML working group would like to import the XForms elements into the 
> HTML namespace so that authors don't have to provide namespace prefixes.

Earlier, John Boyer mentioned an idea about somehow binding (X)HTML 
input elements to the equivalent XForms markup [1], thus making the 
(X)HTML forms markup a kind of shorthand syntax for XForms.  I'm still 
waiting for further explanation about that and several other questions I 
asked [2].

> This presents some problems for documents delivered as text/html, since 
> existing browsers would treat input as an empty element. This could be 
> avoided by changing to a new element name,
> or by introducing attributes in place of child elements.

Why do we even need to attempt to retrofit the XForms syntax into HTML? 
  Why can't we work with the existing markup constraints and reuse 
existing structures, where possible.  It may not be as theoretically 
pure as the XForms approach, but it can work.  IMHO, the WF2 draft has 
attempted to do exactly that and there's already at least one early 
implementation demonstrating that this method can work.

> Internet Explorer honors the /> syntax for empty elements whereas 
> Firefox and Opera, for instance, do not.

IE only honours that for its non-standard, pseudo-XML nonsense known as 
XML Data Islands.  It would not be possible to retrofit this XML Empty 
Element syntax into HTML and have it work like XML.  It would break many 
pages.  I have actually seen garbage like this on sites before:

<p/>...</p>

Of course that is valid in HTML 4, but no browser honours its real 
meaning either.

> This would seem to include the ability to set data type and value 
> constraints as attributes on form fields, for example,
> 
>      type="integer"

WF2 has type="number"

>      min="18"
>      max="15"

WF2 has those attributes.

>      match="regular expression"

WF2 uses pattern=""

> The data type also permits the use of appropriate presentation 
> controls such as date pickers.

WF2 has various types for dates as well and Opera already has date 
pickers implemented for them.

> I don't think the HTML4 form element is needed, as it can be
> replaced by elements that describe how and where to submit the
> data.

WF2 allows submit buttons to have their own method and action attributes 
for that purpose.

[1] http://lists.w3.org/Archives/Public/www-forms/2006Aug/0175
[2] http://lists.w3.org/Archives/Public/www-forms/2006Sep/0006

-- 
Lachlan Hunt
http://lachy.id.au/
Received on Monday, 4 September 2006 15:31:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:22:06 GMT