- From: Micah Dubinko <MDubinko@cardiff.com>
- Date: Wed, 1 May 2002 16:40:19 -0700
- To: 'Plech¹míd Martin' <Martin.Plechsmid@merlin.cz>, "'XForms'" <www-forms@w3.org>
Hi Martin, 1) Navigation among several models: Could you elaborate on your use case? Why do you need to do this? I ask because the Working Group is discussing this topic. a. If both of the models have initial instance data inline, why not just combine them? (Possibly, one or both of them might come from an external source and/or not be easily modifiable for other reasons. If so, read on...) b. If you just need some temporary (non-submittable) instance data, this is a case we are currently discussing and would like to support. (but no guarantees on any particular outcome). c. If you *really* need two separate forms that interact, that's a condition we've intentionally ruled out. (In which case, you would need your model() extension function) ...further response is forthcoming, but will require more discussion first... Thanks, .micah -----Original Message----- From: Plech¹míd Martin [mailto:Martin.Plechsmid@merlin.cz] Sent: Tuesday, April 30, 2002 1:19 AM To: 'XForms' Subject: In which state the works on the standard are? Hello. In our project we've got to such a phase that we desperately need to resolve several issues concerning XForms. Before we do so in a proprietary way, I'd like to ask whether the working group has reached a consensus in these topics, in order we don't set off in a completely different direction. If there is no consensus yet, we'll use the following solutions: 1) Navigation among several models: Having <xf:model id="abc"> <xf:instance> <a> <b><c>1</c><d>One</d></b> <b><c>2</c><d>Two</d></b> <b><c>3</c><d>Three</d></b> </a> </xf:instance> </xf:model> <xf:model id="xyz"> <xf:instance> <x> <y>2</y> </x> </xf:instance> </xf:model> we need e.g. to choose values from one model with respect to values in another model: calculate="model('abc')/a/b[c=model('xyz')/x/y]/d" The function model() behaves similarly as the xpath function document() - it returns the root of the corresponding model. If used as "model('xyz', 'y'), a relative xpath with respect to the context node can be used. Each model has its independent context node. 2) A better and more explicit control over form controls: We need e.g. - to grey out the "Next" button if this one is the last page of a sequence of pages; - to hide the whole table if it doesn't contain any line (generated by <xf:repeat>); - to be able to show instance data via a readOnly <xf:selectOne> form control, and at the same time to be able to modify the bound value via XForms actions (e.g. by <xf:setValue> or <xf:bind>'s "calculate"). Therefore we decided to support the attributes "relevant", "readOnly" etc. not only on <xf:bind> elements but also on form controls and on the <xf:group> element. A form control is e.g. readOnly if either the bound instance data node is readOnly, or if it has a readOnly attribute which evaluates to true. The values of these attributes are inheritted through the XForms controls xml hierarchy. E.g. if a xf:group is not relevant, neither of its descendants is relevant. 3) etc. Thank you, Martin.
Received on Wednesday, 1 May 2002 19:41:00 UTC