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

positional predicates in canonical binding-expressions?

From: joern turner <joern@webman.de>
Date: Wed, 11 Jul 2001 04:57:12 -0400 (EDT)
To: www-forms@w3.org
Message-ID: <3B4B8234.1030709@webman.de>
in my effort to implement a web-based implementation i've come over some 
pratical problem with the current definition of canonical binding 
expressions in conjunction with repeat-elements.

i'm not an expert in xpath, but from my current understanding i need a 
'positional' predicate ( like e.g. [1] ) to completely handle 
repeat-elements:
(please correct me, if i've missed something!...)

although there's no problem while processing the form, it occurs when 
the collected instance-data have to be submitted via http as key/value 
pairs. as http makes no guarantee about the order of posted parameters, 
each single instance-value must be referenced uniquely by a canonical 
binding-expression, so the instance can be 're-assembled' on the server.

the repeat example clarifies the  problem:
(i hope this gets not too scrambled)

<items>
	<item>
		<field1/>
		<field2/>
	</item>
	<item>
		<field1/>
		<field2/>
	</item>
</items>


to submit these instance-data i see no other way than specifying a 
parameter with a positional predicate in the ref-attribute like this:

/items/item[2]/field1

then the above data could be transferred in the following form (but 
arriving the server in no specific order)

/items/item[1]/field1
/items/item[1]/field2
/items/item[2]/field1
/items/item[2]/field2

the same problem applies for simple lists.

please excuse the lengthy mail and tell me about your thoughts in that area.
Received on Wednesday, 11 July 2001 05:03:49 GMT

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