Hi, I'm trying to find a way in order to upload file.
My instance is : <xforms:instance id="file-instance2"> <form xmlns=""> <action/> <files> <file filename="" mediatype="" size=""/> </files> </form> </xforms:instance> ------------------------------------------------------------------- My submission is this : <xforms:submission id="load-submission" ref="instance('file-instance2')" method="post" replace="all" action="/is/evaluation/documents/"/> --------------------------------------------------------- ------------------------------------------------------ My action is this : <page id="document_page" path-info="/is/evaluation/documents/" ......> <action when="/form/action='upload'" action="/is/evaluation/documents/upload.xpl"/> </page> --------------------------------------------------------------------------------------------------------------- My upload.xpl is like this : <p:param type="input" name="instance"/> <p:processor name="oxf:file-serializer"> <p:input name="config"> <config> &nb sp; <file>upload.doc</file> <directory>C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\CGCReloaded\WEB-INF\resources\is\evaluation\documents</directory> <content-type>application/vnd.ms-word</content-type> </config> </p:input> <p:input name="data" href="#instance"/> </p:processor> ---------------------------------------------------------------------------------------------------- However I have an error like this : error message : Root element must contain an xsi:type attribute Could you please help me ? Thank you ! ----------------------------------------------------- -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Administrator
|
On 2/4/07, Wang Yan <[hidden email]> wrote:
> However I have an error like this : > error message : > Root element must contain an xsi:type attribute You might be getting this error because you are missing something like this in your XForms model: <xforms:bind nodeset="file" type="xs:anyURI"/> This tells the engine that when the file is uploaded, you want the file to be stored in a temporary file, and you want the node to be populated with the URI of that temporary file (which will look like file:/...). The alternative to xs:anyURI is xs:base64Binary, if you want the file to be put there in the instance encoded in base64. Also see: http://www.orbeon.com/ops/doc/reference-xforms-ng#xforms-upload Alex -- Orbeon Forms - Web Forms for the Enterprise, Done the Right Way http://www.orbeon.com/ -- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: mailto:[hidden email] For general help: mailto:[hidden email]?subject=help ObjectWeb mailing lists service home page: http://www.objectweb.org/wws |
Free forum by Nabble | Edit this page |