Hi, I want to pick up a file from my private directory and put this file purely under a collection of eXist databases ?
I've tried with this code example, it doesn't work well, can someone help me ? Thanks ! <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" xmlns:delegation="http://orbeon.org/oxf/xml/delegation" xmlns:sql="http://orbeon.org/oxf/xml/sql" xmlns:oxf="http://www.orbeon.com/oxf/processors" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" xmlns:xu="http://www.xmldb.org/xupdate"> <p:param name="instance" type="input"/> <p:param name="data" type="output"/> <p:processor name="oxf:xmldb-query"> &nbs p; <p:input name="datasource" href="../data-access/exist/datasource.xml"/> <p:input name="query"> <xdb:query>xmldb:create-collection('/db/oxf', 'uploadCollection'), xmldb:store('/db/oxf/uploadCollection', 'myFile.xml',<gaga/>) </xdb:query> </p:input> <p:output name="data" ref="#instance"/> </p:processor> </p:config> ----------------------------------------------------- -- 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
|
Do you want to upload an XML document, or a binary file?
-Erik Wang Yan wrote: > Hi, I want to pick up a file from my private directory and put this file > purely under a collection of eXist databases ? > > I've tried with this code example, it doesn't work well, can someone > help me ? > > Thanks ! > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:delegation="http://orbeon.org/oxf/xml/delegation" > xmlns:sql="http://orbeon.org/oxf/xml/sql" > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" > xmlns:xu="http://www.xmldb.org/xupdate"> > <p:param name="instance" type="input"/> > <p:param name="data" type="output"/> > > <p:processor name="oxf:xmldb-query"> > &nbs p; <p:input name="datasource" > href="../data-access/exist/datasource.xml"/> > <p:input name="query"> > <xdb:query>xmldb:create-collection('/db/oxf', > 'uploadCollection'), xmldb:store('/db/oxf/uploadCollection', > 'myFile.xml',<gaga/>) </xdb:query> > </p:input> > <p:output name="data" ref="#instance"/> > </p:processor> > </p:config> 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 |
Ja, good question :)
Indeed, I want to uplaod any kind of files, especially word, excel and PDF. Just deposite it on a folder of the databases. En réponse à Erik Bruchez <[hidden email]> : Do you want to upload an XML document, or a binary file? ----------------------------------------------------- -- 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
|
In reply to this post by Wang Yan
You can use an <xforms:bind> to set the type of the node that contains
the file to xs:base64Binary. Then the content of the file will be stored in the that node encoded with base64. So you can store the XML document as any other XML document in eXist. Of course, that will only work if the file is relatively small. Alex On 12/11/06, Wang Yan <[hidden email]> wrote: > Hi, I want to pick up a file from my private directory and put this file > purely under a collection of eXist databases ? > > I've tried with this code example, it doesn't work well, can someone help me > ? > > Thanks ! > > <p:config xmlns:p="http://www.orbeon.com/oxf/pipeline" > xmlns:delegation="http://orbeon.org/oxf/xml/delegation" > xmlns:sql="http://orbeon.org/oxf/xml/sql" > xmlns:oxf="http://www.orbeon.com/oxf/processors" > xmlns:xs="http://www.w3.org/2001/XMLSchema" > xmlns:xdb="http://orbeon.org/oxf/xml/xmldb" > xmlns:xu="http://www.xmldb.org/xupdate"> > <p:param name="instance" type="input"/> > <p:param name="data" type="output"/> > > <p:processor name="oxf:xmldb-query"> > &nbs p; <p:input name="datasource" > href="../data-access/exist/datasource.xml"/> > <p:input name="query"> > <xdb:query>xmldb:create-collection('/db/oxf', > 'uploadCollection'), > xmldb:store('/db/oxf/uploadCollection', > 'myFile.xml',<gaga/>) </xdb:query> > </p:input> > <p:output name="data" ref="#instance"/> > </p:processor> > </p:config> > > > > > ----------------------------------------------------- > Romandie Annonces : http://annonces.romandie.com > Petites annonces 100% gratuites entre romands > ----------------------------------------------------- > > > -- > 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 > > > -- Blog (XML, Web apps, Open Source): http://www.orbeon.com/blog/ -- 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
--
Follow Orbeon on Twitter: @orbeon Follow me on Twitter: @avernet |
Free forum by Nabble | Edit this page |