W3C home > Mailing lists > Public > public-html@w3.org > April 2007

Re: HTML forms, XForms, Web Forms - which and how much?

From: Matthew Raymond <mattraymond@earthlink.net>
Date: Sun, 29 Apr 2007 22:55:53 -0400
Message-ID: <46355AB9.5020907@earthlink.net>
To: mark.birbeck@x-port.net
CC: public-html@w3.org

Mark Birbeck wrote:
> An illustration might be this:
> 
>   <xf:input ref="firstname">
>     <xf:label>First name:</xf:label>
>   </xf:input>
> 
>   <xf:input ref="surname">
>     <xf:label>Surname:</xf:label>
>   </xf:input>
> 
>   <xf:output value="concat('Hello, ', firstname, ' ', surname)" />
> 
[...]
> Now, that's great, and it's nice and simple for new authors. You'll
> notice, for example that it's even easier than the very simple
> approach used in Web Forms 2.0, since it avoids the 'event-oriented'
> technique.

WF2:
| <label>First name: <input name="firstname"></label>
| <label>Surname: <input name="surname"></label>
|
| <output onforminput=
| "value='Hello, ' + firstname.value + ' ' + surname.value" />

   It's not quite a simple as your above example, but it's pretty close.

XForms Transitional:
| <label>First name: <input name="firstname"></label>
| <label>Surname: <input name="surname"></label>
|
| <input readonly calculate="'Hello, ' + firstname + ' ' + surname">

   See that XForms Transitional is even simpler. When we hybridize the
two, we get something that's conceptually identical to your example:

WF2/XFT hybrid:
| <label>First name: <input name="firstname"></label>
| <label>Surname: <input name="surname"></label>
|
| <output calculate="'Hello, ' + firstname + ' ' + surname" />
Received on Monday, 30 April 2007 02:53:18 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:43 UTC