Regarding multiple <instance>s...

Plechsmíd Martin <Martin.Plechsmid@merlin.cz> wrote
http://lists.w3.org/Archives/Public/www-forms-editor/2002Feb/0068.html

6) I suggest to allow more than one xforms:instance element in one
xforms:model.

---

Martin had lots of thoughtful feedback, but I would like to reinforce this
one particular point.

A general design principle in XForms is that the initial instance/submitted
instance can be arbitrary XML. Cardiff's implementation experience in
attaching forms to XML systems bears this out: any additional layer needed
between the existing XML and the form creates massive maintenance and
support issues. (this is one problem with HTML forms that we look to XForms
to solve)

So, we would like to pipe XML directly into the form, with no intermediate
steps. Currently, this is difficult in many cases.

It is common to have a situation where:
1) The XML format delivered by the server is difficult or impossible to
alter, and
2) A form based on this XML needs non-submitted temporary values. Since the
XML structure is fixed, there's no place for these temporary nodes.

Martin's suggestion (along with the ability to submit a subtree) is one
possible solution. Other possibilities include, in order of preference:

a) Allow cross-instance access. A method such as instance() that returns the
root node of another instance would allow all the temporary data to be
stored in a separate instance and accessed when needed.

b) Instead of the "either-or" processing of inline vs. linked initial
instance data, make it "and" processing. In other words, if the <instance>
element contains both inline content and an xlink:href attribute, take both
and merge. Thus, the temporary area could be inline XML while still getting
the actual data from the server. Using subtree submit, the submitted XML
could still be structurally identical with the incoming XML.

c) Explicit temporary variables. get("name", "value") and set("name",
value")

Thank you for considering this,

.micah

Received on Friday, 22 February 2002 16:23:58 UTC