I am new to xforms technology.
I have created a form using xforms functionality. When I am clicking on the 'save' button, only data entered by the user in the form is saved in an XML file in local machine.
My requirement is:
1. The form along with data should be stored.
2. I would like to load the data from the saved xml file, show them to the user so that user can modify the data and again save it.
Please advise how it can be achieved.
For point (2)I have used the following inside <xforms:model> but no use.
<!-- Load documents when the XForms engine is ready -->
<xforms:send ev:event="xforms-model-construct-done" submission="loadDoc"/>
<!-- Submission to save the document -->
<xforms:submission id="saveDoc" ref="instance('documents-instance')" action="file:///C:/checkInDoc.xml" method="put" replace="none">
<!-- Submission to get the document -->
<xforms:submission id="loadDoc" method="get" action="file:///C:/checkInDoc.xml" replace="instance" instance="documents-instance"/>
Thanks in advance.
This topic has been locked.
1 reply Latest Post - 2011-09-09T16:06:46Z by SystemAdmin
Pinned topic Save Xforms and reload xform with saved data
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2011-09-09T16:06:46Z at 2011-09-09T16:06:46Z by SystemAdmin
SystemAdmin 110000D4XK265 PostsACCEPTED ANSWER
Re: Save Xforms and reload xform with saved data2011-09-09T16:06:46Z in response to saritaxformHello,
This is a very interesting question and I think that the best answer requires a basic XForms extension (I'm an Invited Expert in the W3C Forms Work Group so it might even be considered to be included in the future specifications!).
Please let me explain:
- when you want an XML document to be transformed by an XSLT stylesheet, you add the corresponding processing-instruction
- when you want an XML document to be validated against an XML Schema, you can now also a specific processing-instruction
So, another specific processing-instruction to point to the XForms document to be used to edit it would be very nice indeed.
This could be prototyped with XSLTForms.
What do you think?