RE: XForms WD 20020118 - Questions about instanceData

1) When initial instance data is provided (either inline or through
xlink:href), the output XML format is exactly the same--except, of course,
for any changes caused by user input.

2) Yes, by default all the original elements would still be there.

3) "User defined" datatypes, aka. derived XML Schema datatypes, are fully
supported. The association occurs either through xsi:type attributes on the
instance data, or a 'type' constraint on the element <bind>. We don't have
plans to make this happen through the UI.

Thanks!

.micah


-----Original Message-----
From: Naresh Bhatia [mailto:NBhatia@sapient.com]
Sent: Sunday, January 20, 2002 1:20 PM
To: www-forms@w3.org
Subject: XForms WD 20020118 - Questions about instanceData


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 Tuesday, 22 January 2002 18:36:47 UTC