XForms Submit Protocol

I try to implement a subset of XForms to use it as a Serverside webapplication.
I have some XSLT's to convert XFORMs to HTML Forms.
There is no real problem with this.

The Problem is when I try to bind a XML File (XML DB) to
XForms. 

I started to implement a  example.
It's a simple adressbook.

The XML Data File looks like
====================

<?xml version="1.0" encoding="ISO-8859-1"?>
<telephonebook>
         <item id="1">                
                <firstname>Bernhard</firstname>                
                <lastname>Zwischenbrugger</lastname>                 
                <number>+43/1/944 5764</number>         
          </item>         
          <item id="2">                
                 <firstname>Bill</firstname>                 
                 <lastname>Clinton</lastname>       
                 <number>555 34 3442 345</number>         
           </item>         
           <item id="3">
                <firstname>Sadam</firstname>                
                <lastname>Hussain</lastname>                 
                <number>555 345 345 43</number>   
           </item>         
           <item id="4">                 
                   <firstname>Karl</firstname> 
                   <lastname>Putin</lastname>                 
                   <number>555 3245453</number>         
           </item> 
</telephonebook>  

XForms.xml
==========

<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE DOCUMENT [
<!ENTITY instancedata SYSTEM "telephone.xml">
]>
<xform id="telephonebook">
<data>
&instancedata;
</data>
<submitInfo target="http://localhost/forms/test.php" />
<groupbox title="Person">
                <hidden ref="/telephonebook/item/@id">
                </hidden>
                <textbox ref="/telephonebook/item/firstname">
                        <caption>Firstname</caption>
                </textbox>
                <textbox ref="/telephonebook/item/lastname">
                        <caption>Lastname</caption>
                </textbox>
                <textbox ref="/telephonebook/item/number">
                        <caption>Number</caption>
                </textbox>
</groupbox>
<submit xform="telephonebook">Save</submit>
</xform>   




Select a Dataset
==============

To make the HTML Form is not a real Problem.
Wenn I try to insert default values to the Form, I have some problems.

My Questions:
============

o Is it intentet to select the default values (instance data) with the "ref"
attribute.
ref="item/firstname" or
ref="item[2]/firstname" or
ref="item[@id='3']/firstname
is this decision up to me? 

o Is it intendet to spezify to target of the submitted values by the "ref"
attribute

o is there a "XForms Submit Protocol"? 
It's no problem to submit the values per GET and POST. It's possible
to submit the values as an XML-File or name/value pairs.
(10.6.4 - 10.6.5)

The thing I'm missing is the protocol for submit, reset, construct, timezone,...

In my example I have to spezify the location  to save the transmitted
data. 

This may look like (URLEncoded):
http://myhost/?action=insert&id=5&/name/firstname=bernhard&/name/lastname=.....

Or is this the better solution:
http://myhost/?action=insert&/item[@id=5]/firstname=bernhard&/item[@id=5]/lastname=...

There is no protocol for "10.3 Events".

o Will the "XForms Submit Protocol" be part of XForms 1.0

o Assign XML-Instance, XForms, XForms Prozessor
I have 3 Files: 
XML-Instance data: telephone.xml
XForms :                  xform.xml
XForms Processor   : xforms.xslt

Is the telephone.xml assigned to the xforms-processor or to the xforms.xml?

DOM or XFORMs
===============
Is it part of the XForms 1.0 to tell the application what to
do with the submitted values? 
The "ref" attribute makes me think, that XForms tells the application
where to find the values in the XML-File. But there is no possibility to tell
what to do with the data (insert, update, delete). 
Maybe I can do this task with DOM?

o Where is the interface between XForms and DOM?




Hope you understand what I'm writing about.

 

-----------------------------------------------------
Bernhard Zwischenbrugger       Datenküche
Tel.: +43/1/944 57 64          Redaktionssystem
Mobil.: +43/699/1944 57 64     Web Content Management
-----------------------------------------------------
http://www.datenkueche.com

Received on Monday, 2 April 2001 09:53:49 UTC