[Xsltforms-support] Cannot submit with @replace="all" on xforms-ready
Brought to you by:
alain-couthures
From: Eric v. d. V. <vd...@dy...> - 2013-08-24 09:44:34
|
Hi, The following form: <?xml version="1.0" encoding="utf-8"?> <?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>Submission on xforms-ready</title> <xf:model id="model"> <xf:instance id="instance"> <data xmlns="">Whatever</data> </xf:instance> <xf:submission id="echo" ref="instance('instance')" method="POST" action="http://localhost:8088/exist/apps/betterform/sandbox/echo.xq" replace="all"/> <xf:send ev:event="xforms-ready" submission="echo"/> </xf:model> </head> <body> </body> </html> Where echo.xq is: xquery version "1.0"; (: echo-post.xq: Return all data from an HTTP post to the caller. :) declare namespace exist = "http://exist.sourceforge.net/NS/exist"; declare namespace xmldb="http://exist-db.org/xquery/xmldb"; declare namespace request="http://exist-db.org/xquery/request"; declare option exist:serialize "method=xml media-type=text/xml indent=yes"; let $post-data := request:get-data() return <post-data> {$post-data} </post-data> Raises the following error: XSLTForms Exception -------------------------- Error dispatching event 'xforms-submit' : @file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:4403 XsltForms_submission.prototype.submit@file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:4445 @file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:10197 XsltForms_xmlevents.dispatch@file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:10106 XsltForms_dispatch.prototype.run@file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:5240 XsltForms_abstractAction.prototype.exec_@file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:5084 XsltForms_abstractAction.prototype.execute@file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:5069 XsltForms_browser.run@file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:2778 @file:///home/vdv/projects/xsltforms-code/build/suite.xml:26 @file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:9983 XsltForms_xmlevents.dispatch@file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:10104 XsltForms_xmlevents.dispatchList@file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:10075 @file:///home/vdv/projects/xsltforms-code/build/xsltforms.js:3282 TypeError this.binding.evaluate(...) is undefined Thanks, Eric |