Re: positional predicates in canonical binding-expressions?

In my implementation Iīve decided to post the data as an XML string inside a 
textarea, so I get it the way I need it. In my thin (3 lines) ASP/PHP layer 
I put it through the XML parser to feed a DOM to the business objects that 
have to process it.

Doing a field-by-field post probably was the way you found to reuse your old 
page-processing code or your skills, but I can tell you XML IS THE WAY.

For example, some of my application objects donīt even bother to 
desserialize the XML: they work over the in-memory DOM and store the 
processed version in the database as a string.

----Original Message Follows----
From: "joern turner" <joern@webman.de> (by way of "Masayasu Ishikawa" 
<mimasa@w3.org>)
To: www-forms@w3.org
Subject: positional predicates in canonical binding-expressions?
Date: Wed, 11 Jul 2001 04:57:12 -0400 (EDT)

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.








_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.

Received on Wednesday, 11 July 2001 10:36:10 UTC