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

Re: A forms-lite straw man

From: Matthew Raymond <mattraymond@earthlink.net>
Date: Tue, 05 Sep 2006 21:22:51 -0400
Message-ID: <44FE22EB.9000103@earthlink.net>
To: John Boyer <boyerj@ca.ibm.com>
CC: public-appformats@w3.org

John Boyer wrote:
> 
> 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.

   There's no point of deliberately discarding the <label> element in
(X)HTML. If there's no <label> for the element, then you could use the
|name| attribute as an unofficial label for general processing, but it
shouldn't replace <label> in the sense that it's used in HTML right now.

   Also, <label> inside <input> should be avoided. Web authors may see
that <input> has a close tag and assume that the contents are actually
the control value, similar to <textarea>, so having the <label> inside
is counterintuitive.

> 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:model>
>    <xf:instance xmlns="">
>        <data>
>          <Name>John</Name>
>       </data>
>    </xf:instance>
> </xf:model>
> 
> <xf:input ref="Name">
>    <xf:label>Name</xf:label>
> </xf:input>

   +1, although I'd like to state again that we still need HTML <label>
elements for fallback.

| <form [...]>
|   <label>Enter your name:
|     <input name="Name" value="John"/>
|   </label>
| </form>

   Hmm. Now that I think of it, UI labels are not the same as labels for
individuals units in a data model.

   I strongly advocate keeping form for backwards compatibility. It can
be safely ignored when its XForms equivalent is present.
Received on Wednesday, 6 September 2006 01:23:25 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:10:20 GMT