- From: Steven Pemberton <Steven.Pemberton@cwi.nl>
- Date: Fri, 02 Dec 2011 16:08:36 +0100
- To: "Forms WG" <public-forms@w3.org>
Take this XForm (fragment), which loads an instance, changes a value, and writes it out again: <model> <instance src="http://example.com/data"/> <submission id="put" resource="http://example.com/data" method="put"/> <action ev:event="xforms-ready"> <setvalue ref="date" value="now()"/> <send submission="put"/> </action> </model> I believe we agreed (just checking) that this will work whether the data coming in is XML or JSON. In other words, the submission uses the same mediatype to serialise as the instance was populated with. I think the same should be true in this case, where instead of using src=, the instance is populated with a submission replace="instance." Again, just checking. <model> <instance id="i"/> <submission id="get" resource="http://example.com/data" method="get" replace="instance" instance="i"/> <submission id="put" resource="http://example.com/data" method="put"/> <action ev:event="xforms-ready"> <send submission="get"/> <setvalue ref="date" value="now()"/> <send submission="put"/> </action> </model> Steven
Received on Friday, 2 December 2011 15:09:20 UTC