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

RE: Creating, editing and viewing of data

From: Micah Dubinko <MDubinko@cardiff.com>
Date: Mon, 21 Jan 2002 10:21:24 -0800
Message-ID: <E840F0B7E6189547BDB91DA8BF2228AB28C160@csmail.cardiff.com>
To: "'Naresh Bhatia'" <NBhatia@sapient.com>, www-forms@w3.org
Hi Naresh,

A good way to accomplish this would be with initial instance data generated
on the server (i.e. a Web Service). This can be used to

* Create data (the server delivers an empty 'skeleton' of XML)
* Edit and view data (the server delivers complete XML)

Additionally, if the data format has a server Schema, XForms can re-use that
to define data validation constraints. More details on this are found at:
http://www.xml.com/pub/a/2001/09/26/xforms.html

Thanks!

.micah

-----Original Message-----
From: Naresh Bhatia [mailto:NBhatia@sapient.com]
Sent: Monday, January 21, 2002 6:05 AM
To: www-forms@w3.org
Subject: Creating, editing and viewing of data


I have a very basic question about XForms. Suppose I want the capability to
create, edit and view some data. For these 3 common operations, I assume
that I would have to create 3 different forms, which are very similar to
each other, but not the same. Is this assumption correct? Moreover, these
forms would probably be generated dynamically based on the mode (create,
edit or view).
For example: 
***** Creating Payment Data ***** 
Here the instance data contains default values only. 
<xforms:model> 
  <xforms:instance> 
    <payment as="credit" xmlns="http://commerce.example.com/payment"> 
      <cc/> 
    </payment> 
  </xforms:instance> 
  <xforms:submitInfo action="http://example.com/submit" method="post"/> 
</xforms:model> 
<selectOne ref="my:payment/@as">  ... </selectOne> 
<input ref="my:payment/my:cc">  ... </input> 
***** Editing Payment Data ***** 
Here the instance data contains persisted values for each field in the
structure. 
<xforms:model> 
  <xforms:instance> 
    <payment as="credit" xmlns="http://commerce.example.com/payment"> 
      <cc>123456789012345</cc> 
    </payment> 
  </xforms:instance> 
  <xforms:submitInfo action="http://example.com/submit" method="post"/> 
</xforms:model> 
<selectOne ref="my:payment/@as">  ... </selectOne> 
<input ref="my:payment/my:cc">  ... </input> 
***** Viewing Payment Data ***** 
Here the instance data contains persisted values for each field in the
structure and all the fields are constrained to be readOnly.
<xforms:model> 
  <xforms:instance> 
    <payment as="credit" xmlns="http://commerce.example.com/payment"> 
      <cc>123456789012345</cc> 
    </payment> 
  </xforms:instance> 
  <xforms:submitInfo action="http://example.com/submit" method="post"/> 
  <xforms:bind ref="my:payment/@as" readOnly="true"/> 
  <xforms:bind ref="my:payment/my:cc" readOnly="true"/> 
</xforms:model> 
<selectOne ref="my:payment/@as">  ... </selectOne> 
<input ref="my:payment/my:cc">  ... </input> 
Naresh Bhatia 
Sapient 
One Memorial Drive, Cambridge, MA 02142 
Tel: 617-761-1771  Fax: 617-621-1300 
Email: nbhatia@sapient.com 
Received on Monday, 21 January 2002 13:23:53 GMT

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