Re: Input controls and datatypes

On Sat, 27 Nov 2010 23:28:19 +0100, COUTHURES Alain  
<> wrote:

> It's a great idea to allow xf:input to have a different behavior  
> according to datatypes and the recommendation doesn't limit this to  
> xsd:date and xsd:boolean.
> For example, a color picker could be based on a new xf:color datatype.
> Then, I wonder if xf:range, xf:secret, xf:upload, xf:textarea and  
> xf:select1 couldn't even be obtained from other datatypes to be defined  
> with just xf:input??

I've often considered this, and rather like the idea in general. Certainly  
range can be done from a datatype, but I think secret is frankly more  
likely to be a MIP (especially when you see wifi dialogues that allow you  
to show the password you are typing in by checking a box). On the other  
hand, I'm not sure what to do with a select1 that is secret.

The problem with select1 is assigning labels to the values (I'm not  
against the idea, just saying that the assignment needs to be done  

Upload would need some work because of its strange semantics (adopted from  
HTML), since it needs an optional mediatype and something to distinguish a  
URL from a direct upload.

> So, instead of defining a new element for each new control type, this  
> would be an implementation-dependent feature to render it with a widget  
> or with just a regular input field in a sort of "raw" mode. Is XBL good  
> for extending xf:input behavior??

I'm pretty sure it is. Mark Birbeck has a lot of experience here. He has  
inputs that map to a map widget for instance.

> #2: About xf:select, I think that the idea of space separated values is  
> good for attribute bindings but, for me, for element bindings, it would  
> be more an XML approach to clone the element with the newly selected  
> value. This way, an xf:repeat structure could be based on it.

The datatype for a select would be a set of an enumeration, and that would  
make it easier than today selecting values with spaces.
So cloning elements are the way to go. But XForms already supports that  
with the <copy> element in <select>.


> Did the WG already consider these questions?
> Thanks!
> -Alain

Received on Wednesday, 1 December 2010 15:48:09 UTC