RE: Input controls and datatypes

Alain,

> 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

Enumerations are an interesting example. I'd always assumed that you'd want to present the control as a select1. However, I'm now wondering how you define, through XML Schema, a delimited list of zero to many items from an enumerated list.


> For example, a color picker could be based on a new xf:color datatype.

Colour is a tricky choice to illustrate this. The web has many ways to express colours and the wider-world has many more, and they're all context dependant. It is almost as though you need two types with which to define colours. One is the value range and the other is the colour model. For example: RGB, SRGB, CMYK, HSB, HSV, Lab and LUV all have base data types that are either integer or real numbers that are expressed as a set of values, in a specific range, according to the colour model and then you have colour palettes (Pantone, Focaltone) that are an enumerated list of colour keywords with corresponding definitions within a specific colour model. Also, the colour picker itself will have to vary depending upon the colour model chosen.

I think, at the end of the day, how the data type affects the presentation of a control is purely down to the form's context and therefore it should be in the control of the form author and not the form renderer.


Regards

Philip



-----Original Message-----
From: public-forms-request@w3.org [mailto:public-forms-request@w3.org] On Behalf Of COUTHURES Alain
Sent: 27 November, 2010 10:28 PM
To: Forms WG
Subject: Input controls and datatypes

Hello,

#1: I'm now considering how to add new input widgets in XSLTForms.

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??

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??

#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.

Did the WG already consider these questions?

Thanks!

-Alain

Received on Tuesday, 30 November 2010 15:04:51 UTC