[Xsltforms-support] File Upload submit problem
Brought to you by:
alain-couthures
From: Mark L. <ma...@em...> - 2012-04-07 20:16:11
|
Hi, I'm trying to use the new upload control, but can't get it to submit and I get submission-error from the xform. I've pared it down to the simplest I can and it seems to be the schema that's tripping it up. Any ideas? XForm looks like this - I've omitted declarations etc. <head> <xf:model> <xf:instance xmlns=''> <data> <xml-base64 xsi:type="xs:base64Binary"/> </data> </xf:instance> <xf:submission id='post-to-echo' action='post-echo.xql' replace='all' method='post'/> </xf:model> </head> <body> <xf:upload ref="xml-base64"> <xf:label>Upload XML File:</xf:label> </xf:upload> <br/> <xf:output ref="xml-base64"> <xf:label>XML file encoded in base64binary: </xf:label> </xf:output> <br/> <xf:submit submission="post-to-echo"> <xf:label>Post to Echo</xf:label> </xf:submit> </body> And my XQuery (existdb) xquery version "1.0"; declare namespace xsi="http://www.w3.org/2001/XMLSchema-instance"; declare namespace xmlns:xs="http://www.w3.org/2001/XMLSchema"; declare option exist:serialize "method=xml media-type=text/xml indent=yes"; let $post-data := request:get-data() return <results> {util:binary-to-string($post-data/xml-base64)} </results> |