xhtml - XForms data model can not be saved in XML file -


i have following xforms code:

<?xml-stylesheet href="./xsltforms.xsl" type="text/xsl"?> <?xsltforms-options debug="yes"?> <html    xmlns="http://www.w3.org/1999/xhtml"    xmlns:xf="http://www.w3.org/2002/xforms"    xmlns:ev="http://www.w3.org/2001/xml-events">    <head>       <title>xforms submit example</title>       <xf:model id="mymodel">                 <xf:instance src="./model.xml"/>                 <xf:bind id="firstname" nodeset="/mydata/firstname"/>                 <xf:submission id="save" method="put" action="./mydata.xml" replace="none" />                 <xf:submission id="loaddoc" action="./mydata.xml" replace="instance" method="get" />       </xf:model>    </head>    <body>                 <xf:input ref="firstname" incremental="true">             <xf:label>please enter first name: </xf:label>          </xf:input>                 <br/>                 <br/>                  output first name: <xf:output ref="firstname" />                  <br/>                 <br/>                  <xf:submit submission="save">          <xf:label>save</xf:label>                 </xf:submit>                  <br/>                 <br/>                  <xf:submit submission="loaddoc">          <xf:label>load</xf:label>                 </xf:submit>     </body> </html> 

this form contains 1 textbox field , 2 buttons save , load, , 1 dependency file model.xml is:

<?xml version="1.0" encoding="utf-8"?> <mydata>                 <firstname>john</firstname>                 <data2>two</data2>                 <data3>three</data3> </mydata> 

the problem is: when entering data text box, pressing save button, model should saved mydata.xml. file exists on disk , not read only

in fact nothing happens, , file's data not updated (by way load button works fine).

what reason of behaviour , how fix , save entered data external file?

did try adding "file://" in action attribute?

-alain


Comments

Popular posts from this blog

sql - VB.NET Operand type clash: date is incompatible with int error -

SVG stroke-linecap doesn't work for circles in Firefox? -

python - TypeError: Scalar value for argument 'color' is not numeric in openCV -