W3C home > Mailing lists > Public > www-forms@w3.org > March 2007

Re: XForms Transitional

From: Laurens Holst <lholst@students.cs.uu.nl>
Date: Fri, 16 Mar 2007 09:56:09 +0900
Message-ID: <45F9EB29.1000309@students.cs.uu.nl>
To: Dave Raggett <dsr@w3.org>
CC: www-forms@w3.org
Dave Raggett schreef:
> XForms Transitional is the name for incremental extensions to HTML4 
> forms that provide simple declarative support for spreadsheet like 
> applications. As the name suggests, the approach allows you to start 
> using some of the functionality available in XForms which offers 
> enterprise strength forms for XML based applications.
>
> You may be interested in looking at the draft specification for XForms 
> Transitional, along with working examples that should function in the 
> majority of modern desktop browsers.
>
>     http://www.w3.org/2007/03/XForms-Transitional/
>
> To enable a comparison of the two approaches, I have also prepared the 
> same examples using Web Forms 2.0, see:
>
>         http://www.w3.org/2007/03/WF2/
>
> You will need to use a browser like Opera 9 that supports Web Forms 
> 2.0 to see the examples in action. I am waiting for some technical 
> assistance with repeating fields and will add the remaining examples 
> as soon as I can. Web Forms 2.0 is very flexible but tends to involve 
> a more procedural approach.

Hello Dave,

 From what I see, it is quite interesting. It would be nice if some 
hybrid between this and Web Forms 2.0 were adopted.

Some comments, although I did only glance over it relatively superficially:

The expression system. Wouldn’t it be better if the expressions were 
XPath? You could expose the fields as local variables for the 
expression, and benefit from the full expressability of XPath. E.g. $x < 
$y. Javascript functions could be made available as XPath functions 
directly, too. This is what we did in Backbase 3.0, and I very much 
liked working with it. XPath seems more suitable for declarative use.

A problem with your Javascript ‘eval’ approach is that reserved 
Javascript keywords will cause errors; ‘for’, ‘with’, etc. all become 
impossible input names, and very likely cause errors in the browser 
unless you specifically check for them, while they are not so strange or 
infrequent.

As for your datepicker example. I’m all for presenting the user with a 
localised date representation, but I think it should submit only an ISO 
date, and also make that representation available through the DOM (or 
perhaps a Date object would be better). Similarly, values for ‘min’ and 
‘max’ should also be ISO dates for this data type.

I also don’t like too much fuzzy logic for different date input formats, 
especially if you start considering that month notations like ‘jan’ and 
‘mar’ are very locale-specific (‘mar’ is ‘maa’ in Dutch), it can get 
very complex; I would suggest restricting the allowed values for manual 
input to yyyy-mm-dd, and only one locale-specific notation (thus, not 
try to parse every possible form). It would also be nice if this were 
dependant on my locale and not the web site’s language/location.

The XForms Transitional doesn’t have an ‘email’ input type which I think 
is very important because 1. it provides a hook for the browser to 
conveniently pop up your address book or do type-ahead completion, and 
2. it is one of the fields that are most over-restricted with regular 
expressions usually. Similarly, there should be an ‘url’ type, just like 
in Web Forms 2.0.

The ‘editable’ attribute on the <select> contains a width value, this 
seems a bit ugly to me, and confused me at first when I saw the example 
(‘editable=12? what does that mean?’). I understand the problem with the 
‘size’ attribute, but think it would be better to just derive the width 
from the content width of the select, just like the regular HTML select 
box does, or use CSS.

Final thoughts…

Web Forms 2.0 focuses a lot on the DOM, too much in my opinion (being 
used to the more declarative approach in Backbase), and the proposed 
attributes in XForms Transitional seem very nice and simple to use. 
However, XForms Transitional puts too little focus on the DOM. Both 
should provide means to do the same thing, where the DOM is suitable if 
you want to do more ‘power’-things the declarative means can’t handle.

Also, I wonder how this is actually related to XForms, precisely, except 
that it takes a more declarative approach than Web Forms 2.0 (which I 
like, of course) and the fact that the W3C likes to say ‘XForms’ :).


~Grauw

p.s. In IE, getAttribute("for") may not work, but 
getAttribute("htmlFor") does. Go figure.

-- 
Ushiko-san! Kimi wa doushite, Ushiko-san nan da!!
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Laurens Holst, student, university of Utrecht, the Netherlands.
Website: www.grauw.nl. Backbase employee; www.backbase.com.



Received on Friday, 16 March 2007 00:56:32 GMT

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