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

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