W3C home > Mailing lists > Public > www-forms@w3.org > January 2002

XForms WD 20020118 - Questions about instanceData

From: Naresh Bhatia <NBhatia@sapient.com>
Date: Sun, 20 Jan 2002 16:19:41 -0500
Message-ID: <FDC3B7209AC0DB46AD9BAC16B43646B1024D189C@cammmsx01.sapient.com>
To: www-forms@w3.org
I am just starting to read the XForms specification and I have the following
questions. Hope the group can clarify these for me.

1) Section 2.4 - Providing XML Instance Data
This section provides an example of an instance element inside the model
element:

<xforms:model>
  <xforms:instance>
    <payment as="credit" xmlns="http://commerce.example.com/payment">
      <cc/>
      <exp/>
    </payment>
  </xforms:instance>
  <xforms:submitInfo action="http://example.com/submit" method="post"/>
</xforms:model>

What is the format of instanceData produced by form. Is it the same as that
shown in section 2.3?

or something like this?
<payment as="credit">
    <cc>123456789012345</cc>
    <exp>2001-08</exp>
</payment>

or something like this?
<instanceData>
    <payment as="credit">
        <cc>123456789012345</cc>
        <exp>2001-08</exp>
    </payment>
</instanceData>

2) Section 2.5 - Constraining Values
If the user selects "Cash", does the returned instance data contain the "cc"
and "exp" elements?

3) Is it an expectation that the XForms processor will understand user
defined data types? For example, if my XForms application uses a class
called Employee that has two members: a name (String) and an address (a
nested type), do I have to specify this data structure somewhere? Or is this
implicit in instance data, something like this:

<xforms:model>
  <xforms:instance>
    <employee>
      <name/>
      <address>
          <line 1/>
          <line 2/>
          <city/>
          <state/>
          <zip/>
      </address>
    </employee>
  </xforms:instance>
  <xforms:submitInfo action="http://example.com/submit" method="post"/>
</xforms:model>

From section 2.5, it appears that the data types can be specified in the
user interface (as constraints). Can they be specified in the model, which
seems like the logical place to define them?

Thanks.

Naresh Bhatia
Sapient
One Memorial Drive, Cambridge, MA 02142
Tel: 617-761-1771  Fax: 617-621-1300
Email: nbhatia@sapient.com
Received on Sunday, 20 January 2002 16:20:12 GMT

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