RE: Outer group vs named form

Unfortunately I am now more confused rather than less.

On my original question I think the answer is something
like : we put "group" around the model examples so that the
reference syntax would be realistic; the model examples
aren't realistic in these cases.  Is this correct?

Now below we have:
   <textbox xform="first" ref="orderForm/shipTo/firstName"/>
The xform attribute exists to direct the ref to the appropriate
form in a multiform document.  But as far as I can tell,
ref takes an XPath and XPath is capable of unambiguous
reference.  So why xform?  Wouldn't you just say:
   <textbox ref="id('first')/orderForm/shipTo/firstName"/>

Or, to take life easy, why not wrap your common-content form
in an element:
<nuts>
   <model href="orderform.xsd"/>
</nuts>
<bolts>
   <model href="orderform.xsd"/>
</bolts>

and then
    <textbox ref="nuts/orderForm/shipTo/firstName"/>

After all the mission here is to set some values into
the leaves of a tree and ship the tree to a server.
Why have a special addressing scheme for the root of
the tree?

John.


At 02:49 PM 2/22/2001 -0800, Micah Dubinko wrote:
>I'm not following you, particularly w.r.t. <group> below...
>
>How about an example? Here's what the markup for the 8.3 example might look
>like:
>(namespace prefixes skipped for clarity)
>
><xform id="first">
>   <model href="orderform.xsd"/>
></xform>
>
><xform id="second">
>   <model href="orderform.xsd"/>
></xform>
>...
><textbox xform="first" ref="orderForm/shipTo/firstName"/>
>
>and elsewhere, the file orderform.xsd contains...
>
><element name="orderForm" type="OrderFormType"/>
><element name="shipTo" type="ShipToType"/>
><element name="firstName" type="string/>
><complexType name="OrderFormType" ... />
><complexType name="ShipToType" ... />
>...
>
>This represents our approach as of the Feb WD. In the absence of an 'xform'
>attribute, the context node is based on the first <xform> element in
>document order. Note that we may be binding to the instance data OR the
>Model/Schema depending on the context.
>
>Is this helpful?
>
>.micah
>
>P.S. The 'id' attributes on <model> and <instance> aren't used for binding,
>they're just there...
>
>-----Original Message-----
>From: John J. Barton [mailto:John_Barton@hpl.hp.com]
>Sent: Thursday, February 22, 2001 10:55 AM
>To: Micah Dubinko
>Cc: www-forms@w3.org
>Subject: RE: Outer group vs named form
>
>
>At 04:52 PM 2/21/2001 -0800, Micah Dubinko wrote:
> >A common use case will be when <orderForm> is an XML Schema that exists in
>a
> >3rd party Web space. XForms works with this by including that schema by
> >reference. A 'name' attribute wouldn't work -- the independent schema would
> >have to be for the <shipTo> fragment, which seems less likely. (Does this
> >make sense?)
>
>Nope, since in that case the <group> is not needed, the Schema
>is provided.  If a schema is referenced for the model do we
>have any elements inside the form?
>
>I guess the real issue is addressing and naming of the address
>anchors.  Given a page with two forms, both of which are orderForm-s,
>how do we reference the instance values?  It seems to me
>that in ref= a.b.c (or a/b/c as the submission format seems to use)
>the "a" has to point to the outermost layer, at the model.
>We need plants.orderForm.address and animals.orderForm.address
>where plants and animals are the two headers we assign in our
>header to contain the two schema references to order forms.
>
>Maybe I just don't have the logic quite yet.  I suppose that
>in every ref we have a context.  Where ever we have ref we are
>in a form?  So orderForm.address gets context from being in the
>form that references the "plants" model?  Similarly the submission
>gets its context this way?
>
>Why does model use "id" and other model elements use "name"?
>
>
> >We are looking for additional use cases.
> >
> >Thanks!
> >
> >.micah
> >(co-editor)
> >
> >-----Original Message-----
> >From: John J. Barton [mailto:John_Barton@hpl.hp.com]
> >Sent: Wednesday, February 21, 2001 1:14 PM
> >To: www-forms@w3.org
> >Subject: Outer group vs named form
> >
> >
> >The example in 8.3 Direct Binding is
> >
> ><orderForm>
> >    <shipTo>
> >      <firstName>value</firstName>
> >    </shipTo>
> ></orderForm>
> >
> >Here the "orderForm" is a group that seems to
> >exist only to give a name to the instance.
> >Why doesn't the model element have a "name"
> >attribute for this purpose?
> >
> >John.
>
>______________________________________________________
>John J. Barton          email:  John_Barton@hpl.hp.com
>http://www.hpl.hp.com/personal/John_Barton/index.htm
>MS 1U-17  Hewlett-Packard Labs
>1501 Page Mill Road              phone: (650)-236-2888
>Palo Alto CA  94304-1126         FAX:   (650)-857-5100

______________________________________________________
John J. Barton          email:  John_Barton@hpl.hp.com
http://www.hpl.hp.com/personal/John_Barton/index.htm
MS 1U-17  Hewlett-Packard Labs
1501 Page Mill Road              phone: (650)-236-2888
Palo Alto CA  94304-1126         FAX:   (650)-857-5100

Received on Friday, 2 March 2001 20:32:07 UTC