Hi.
First of all, I have to said that orbeon is something new to me, so I am going to ask you obvious things. What i want to is to be able to: a) fill a form and save the information in a local file (download a file with the forms data) b) access to the form and upload the file to fill the form and keep working whit it. I heve copied the files so tell me all my errors too. After reading Orbeon docs and examples I have done this, using "copy and paste" from axmaples: ***> page-flow.xml <page id="pg_1" path-info="/frm_xml/frm" view="frm.xhtml" /> ----- x ----- ***> my xml-form (file called mod_form.xml) <?xml version="1.0" encoding="UTF-8"?> <ship> <person> <name/> <age/> </person> <ticket> <price/> </ticket> </ship> ----- x ----- ***> view: frm.xhtml <html .... <head> <xf:model id="mod_FRM"> <xf:instance id="ins_FRM"> <xi:include href="mod_form.xml" xi:omit-xml-base="true"/> </xf:instance> <xf:instance id="ins_FIL"> <files xmlns=""> <file filename="" mediatype="" size="" selected="false" /> </files> </xf:instance> <xf:bind nodeset="instance('ins_FIL')"> <xf:bind nodeset="file" type="xs:anyURI"/> </xf:bind> <xf:submission id="uploadFIL" method="post" ref="instance('ins_FIL')" action="/frm_xml/proc_up.xpl" replace="instance" instance="ins_FRM"/> <xf:submission id="downloadFRM" method="post" ref="instance('ins_FRM')" action="/frm_xml/proc_dw.xpl" /> </xf:model> </head> <body> <xf:group ref="instance('ins_FRM')/preson"> <xf:input ref="name"/> <xf:input ref="age"/> </xf:group> <xf:group ref="instance('ins_FRM')/ticket"> <xf:input ref="price"/> </xf:group> ... ... <xf:upload ref="instance('ins_FIL')/file" xxforms:size="60"> <xf:filename ref="@filename"/> <xf:mediatype ref="@mediatype"/> <xxforms:size ref="@size"/> </xf:upload> <xf:submit submission="uploadFIL"> <xf:label>Upload and read</xf:label> </xf:submit> <xf:submit submission="downloadFRM"> <xf:label>Download and save</xf:label> </xf:submit> ... </body></html> ----- x ----- ***> actions: proc_up.xpl <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:oxf="http://www.orbeon.com/oxf/processors"> <p:param name="instance" type="input" debug="............ IN ............"/> <p:param name="data" type="output" debug="............ OUT ............"/> <p:processor name="oxf:xslt"> <p:input name="config"> <config xsl:version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <url><xsl:value-of select="/*"/></url> <content-type>text/xml</content-type> <force-content-type>true</force-content-type> <cache-control> <use-local-cache>false</use-local-cache> </cache-control> </config> </p:input> <p:input name="data" href="#instance"/> <p:output name="data" id="url-config"/> </p:processor> <p:processor name="oxf:url-generator"> <p:input name="config" href="#url-config"/> <p:output name="data" ref="data"/> </p:processor> </p:config> ----- x ----- ***> action : proc_dw.xpl I do not know how to do it. ----- x ----- I am lost and I do not know how to resolve this situation, so any example will be welcome. Thanks for your help, A. |
Free forum by Nabble | Edit this page |