W3C home > Mailing lists > Public > www-forms@w3.org > September 2005

Re: Most efficient way for a big XForms file

From: Florian Lacoste <florian.lacoste@evidian.com>
Date: Wed, 21 Sep 2005 15:48:49 +0200
Message-ID: <433164C1.7060602@evidian.com>
To: www-forms@w3.org

Victor Engmark wrote:
> Florian Lacoste:
>>>I'm not completely sure I understand how this works, and what you wish
>>>to accomplish. Do you have a link to the XForms?
>>No I can't put it online, but here's what it looks like.
>>	<instance>
>>		<data>
>>			<request>
>>				<object attribute=""/>
>>			</request>
>>			<relevant>
>>				<attribute/>
>>			</relevant>
>>		</data>
>>	</instance>
>>	<bind id="bind-relevant" nodeset="/data/relevant/attribute"/>
>>	<bind id="bind-attribute" nodeset="/data/request/objetc/@attribute" 
>>required="true()" relevant="/data/relevant/attribute='true'"/>
>>	<submission ref="/request"/>
>><!-- UI  -->
>><select bind="bind-relevant">
>>	<item>
>>		<label>attribute</label>
>>		<value>true</value>
>>	</item>
>><input bind="bind-attribute">
>>The user choose to give a value to attribute (or not) with the select 
>>control bound to an element outside of the <request>. Only the <request> 
>>is submited.
>>But inside a repeat, I can't bind the select control to an element 
>>outside the repeat or else all the repeated attribute will be relevant 
>>at the same time.
> My first hunch would be to avoid using elements/attributes to control
> the relevance indirectly. It's hard to tell without knowing your task,
> but (unless you are making an XForms document to produce other XForms
> documents) I'd go for a re-evaluation of the XForms before proceeding.
> Using meta-information such as the format of a string or the existence
> of a node in the instance data to determine relevance can be very
> valuable, and will probably save you a lot of grief when it comes to
> keeping the metadata up to date in complex forms. 
> PS: Feel free to copy this to the list if you want to continue the
> discussion there.

Well this is meant to be used as an UI for a Web Service. The submited 
data have to be a valid SPML request. As some attributes are optional

1) I want to allow the user to choose if he wants to specify a value. So 
I need a control for this choice, but this value MUST NOT appear in the 
submited data.

2) I want to provide the possibility to enter a value, so I need a 
control bound to the attribute/element. In this case the 
attribute/element and its value MUST appear in the submited data. The 
relevancy of this control MUST depend on the user's choice.

3) If the user does not want to specify a value, the optional 
attribute/element MUST NOT appear in the submited data. (If the data was 
submited with attribute="", it could be misinterpreted.

 >>I think it would be interesting to have a way to separate binds to the
 >>data or the controls. One could have a control always relevant (eg:used
 >>for informations in the form) bound to an instance element that is not
 >>(cause one never wants to submit it). Or else several controls bound to
 >>the same instance element but with differents attributes (not relevant
 >>at the same time, differents constraints...)

Is there a way I overlooked to do this with XForms or could it be a 
possible new feature ?

Received on Wednesday, 21 September 2005 13:56:43 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:36:15 UTC