W3C home > Mailing lists > Public > www-forms@w3.org > February 2001

RE: Outer group vs named form

From: Micah Dubinko <MDubinko@cardiff.com>
Date: Thu, 22 Feb 2001 14:49:45 -0800
Message-ID: <BE47764CFF7D0549B1163F849BC6A8D1244673@csmail.cardiff.com>
To: "'John J. Barton'" <John_Barton@hpl.hp.com>
Cc: "'www-forms@w3.org'" <www-forms@w3.org>
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
Received on Thursday, 22 February 2001 17:52:55 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 10 March 2012 06:21:48 GMT