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.
The developerWorks Connections platform will be sunset on December 31, 2019. On January 1, 2020, this community and its apps will no longer be available. More details available on our FAQ.
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 Posts
Re: Save Xforms and reload xform with saved data2011-09-09T16:06:46ZThis is the accepted answer. This is the accepted answer.Hello,
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?