W3C home > Mailing lists > Public > www-forms@w3.org > July 2001

Re: positional predicates in canonical binding-expressions?

From: joern turner <joern.turner@web.de>
Date: Fri, 13 Jul 2001 02:26:09 +0200
Message-ID: <3B4E4021.9040302@web.de>
To: tvraman@almaden.ibm.com
CC: www-forms@w3.org
Hello,

before starting i should state that i'm really welcome the work about 
the repeat-element. this solves a contiuous and repeating ;) problem 
especially in web form-processing.


from my understanding of the draft, the structure of the instance can be 
constructed without referring to a schema - simply by extracting this 
information out of the binding-expression used in the XForms UI. if this 
is not right, some or all of the following may be irrelevant.

T. V. Raman wrote:

> Hi --
> you're correct in that there is no way to reassemble a list
> of items on the server because of how WWW form post works
> today.
> 
> However there is nothing inside the specification for repeat
> that claims we preserve order --perhaps we should make it
> even clearer.

Yes, you're right. That was just an assumption i silently made. But, 
would'nt the user expect to get the data back in the order they have 
been inputted? Wouldn't the notion of a 'document order' as it is common 
in XML be destroyed?

second, -- assuming you have a list of lists in your instance-data which 
you use as initial data (presets) or a preloaded instance, it is not 
possible to reconstruct this list in a submit without the usage of 
positional predicates. The result (again the example from the draft) 
would simply be:

<items>
	<item>
		<f1>first</f1>
		<f2>first</fi>
		<f1>second</f1>
		<f2>second</f2>
		<f1>third</f1>
		<f2>third</f2>
	</item>
</items>

which is clearly a different semantic. maybe i'm on the wrong track 
here, but i'm using the algorithm which is described for 
instance-initialization: evaluating the binding expression from left to 
right and creating appropriate children for each step, if it does not 
exist already.
although the brilliant simplicity of that algorithm would get 
complicated by positions, i couldn't think of any other way to preserve 
the input order which i (as you might have guessed by now) consider 
essential for the usefullness of repeat. otherwise i would urge the 
application using the XForms processor to achieve this some way - which 
may be complicated.


> Incidentally I'm surprized you raised this in connection
> with repeat --and not selectMany --both have the same
> problem --only difference is that selectMany is populating
> a schema list --repeat is populating something with more
> substructure 

not exactly. - a selectMany (in html e.g. mapped to a <select 
multiple="true" ...) will be send as a single parameter: with 
parameter-name and an array of values. The selected values occur in the 
order they're displayed in the list. - at least when you're using the 
serlvet-api to parse parameters.

please excuse my lengthy explanations but as i can hardly think of an 
application which does not rely on some kind of 'natural' order, this 
seems to be an important topic to me.


> 
> 
Received on Friday, 13 July 2001 05:23:14 GMT

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