[Xsltforms-support] XSLTForms xf:submit issues
Brought to you by:
alain-couthures
|
From: Alex B. <rho...@ya...> - 2009-11-24 16:37:21
|
Hi,
I've been working with XSLTForms and have noticed that there's a fair amount of inconsistency between the submission process across different browsers. I've set up the most simplistic example I can and I wanted to post to the group to see whether anyone could offer any advice.
Here's the simple XML instance (1.xml):
<?xml version="1.0" encoding="UTF-8"?>
<item>
<name>Simple instance</name>
</item>
And here's the XForm (submit.xml):
<?xml-stylesheet href="xsltforms/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:xs="http://www.w3.org/2001/XMLSchema"
xmlns:ev="http://www.w3.org/2001/xml-events">
<head>
<title>XSLTForms - Basic Submission [post] example</title>
<xf:model>
<xf:instance id="default" src="1.xml" />
<xf:submission id="save" method="post" action="http://localhost:8080/exist/rest/db/edit/save-new.xq" ref="instance('default')">
<xf:toggle case="case-busy" ev:event="xforms-submit"/>
<xf:toggle case="case-submit-done" ev:event="xforms-submit-done"/>
<xf:toggle case="case-submit-error" ev:event="xforms-submit-error"/>
</xf:submission>
</xf:model>
</head>
<body>
<xf:input ref="/item/name">
<xf:label>Name: </xf:label>
</xf:input>
<xf:submit class="store" submission="save">
<xf:label>Save</xf:label>
</xf:submit>
<xf:switch>
<xf:case id="ready"/>
<xf:case id="case-busy">
<p>Waiting for results from server...</p>
</xf:case>
<xf:case id="case-submit-error">
<p>Submit error</p>
</xf:case>
<xf:case id="case-submit-done">
<p>Submit done</p>
</xf:case>
</xf:switch>
</body>
</html>
I've been testing the submission process with eXist 1.4 and I'm using beta 2 of XSLTForms - all tests so far have been conducted using Windows XP. These are the results I'm getting with the following browsers:
Internet Explorer 8 - successfully saves the document/instance to a collection *and* displays the response (without replace="all") even being required..
Chrome - reports a submit error but *does* save the document/instance to a collection.
Firefox 3.5.x - reports a submit error and does not save the document/instance. From looking at the submission in Firebug, it would appear that it isn't even sending the instance with the request.
Opera 10.01 - reports a submit error and does not save the document/instance.
For what it's worth, I've used the same XForm markup and achieved a successful submission using the firefox plugin and the nightly build of ubiquity-xforms with Firefox 3.5.x
Do these results tally with anyone else's findings? It would be great to at least get the submission process working with Firefox as it has such a large market share. Can anyone offer me any advice based on my posting?
Would there be any benefit in trying the same tests with a nightly build? Can I send more specific console/debug information to help out with this?
Many thanks in advance,
A
|