Hi all,
I'm doing a database for XML Schema with OPS and eXist. At the moment, i can upload a XML Schema in the eXist database (with a given collection). However, I would like to choose the collection (to put my XML Schema) among the exist collection. How do that ??? Thanks a lot Damien. -- 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
|
Hi Damien,
Could you clarify what the problem is with the collection? If you are using the eXist REST API, you can insert a document into a collection in eXist from XPL with: <p:processor name="oxf:pipeline"> <p:input name="config" href="oxf:/ops/utils/submit.xpl"/> <p:input name="submission"> <xforms:submission method="put" action="/exist/rest/db/collection/document"/> </p:input> <p:input name="request"> <document>...</document> </p:input> <p:output name="response" id="dummy"/> </p:processor> <p:processor name="oxf:null-serializer"> <p:input name="data" href="#dummy"/> </p:processor> Alex On 7/24/06, [hidden email] <[hidden email]> wrote: > Hi all, > > > I'm doing a database for XML Schema with OPS and eXist. At the moment, i can upload a XML Schema in the eXist database (with a given collection). However, I would like to choose the collection (to put my XML Schema) among the exist collection. How do that ??? > > > Thanks a lot > > > Damien. > > > > > -- > 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 |
In reply to this post by damien.peymirat
Hi Alex,
In fact, I would like to put my document in a collection which already exist and which I have chosen in the form. However, I can't see how to recover the name of the collections to propose them in my form. Have you got an idea ?? Thank you Damien. -----Message d'origine----- De : [hidden email] [mailto:[hidden email]] De la part de Alessandro Vernet Envoyé : mardi 25 juillet 2006 04:14 À : [hidden email] Objet : Re: [ops-users] eXist database Hi Damien, Could you clarify what the problem is with the collection? If you are using the eXist REST API, you can insert a document into a collection in eXist from XPL with: <p:processor name="oxf:pipeline"> <p:input name="config" href="oxf:/ops/utils/submit.xpl"/> <p:input name="submission"> <xforms:submission method="put" action="/exist/rest/db/collection/document"/> </p:input> <p:input name="request"> <document>...</document> </p:input> <p:output name="response" id="dummy"/> </p:processor> <p:processor name="oxf:null-serializer"> <p:input name="data" href="#dummy"/> </p:processor> Alex On 7/24/06, [hidden email] <[hidden email]> wrote: > Hi all, > > > I'm doing a database for XML Schema with OPS and eXist. At the > moment, i can upload a XML Schema in the eXist database (with a given > collection). However, I would like to choose the collection (to put my > XML Schema) among the exist collection. How do that ??? > > > Thanks a lot > > > Damien. > > > > > -- > 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 |
Administrator
|
Hi Damien,
With the eXist REST interface, you can do this directly from XForms with a submission that looks like: <xforms:submission id="save" ref="instance('doc')" action="/exist/rest/ccm/{xpath to collection}/{xpath to doc}" method="put" replace="none" xxforms:username="admin"/> Note that method is 'put', which will insert or update a document in the database. Also note the attribute value template expressions in 'action'. Those are XPath expressions that let you dynamically create a URL. Alex On 7/25/06, Peymirat Damien <[hidden email]> wrote: > Hi Alex, > > > In fact, I would like to put my document in a collection which already exist and which I have chosen in the form. However, I can't see how to recover the name of the collections to propose them in my form. Have you got an idea ?? > > > Thank you > > > Damien. > > > > > > -----Message d'origine----- > De : [hidden email] [mailto:[hidden email]] De la part de Alessandro Vernet > Envoyé : mardi 25 juillet 2006 04:14 > À : [hidden email] > Objet : Re: [ops-users] eXist database > > > Hi Damien, > > Could you clarify what the problem is with the collection? If you are using the eXist REST API, you can insert a document into a collection in eXist from XPL with: > > <p:processor name="oxf:pipeline"> > <p:input name="config" href="oxf:/ops/utils/submit.xpl"/> > <p:input name="submission"> > <xforms:submission method="put" > action="/exist/rest/db/collection/document"/> > </p:input> > <p:input name="request"> > <document>...</document> > </p:input> > <p:output name="response" id="dummy"/> > </p:processor> > <p:processor name="oxf:null-serializer"> > <p:input name="data" href="#dummy"/> > </p:processor> > > Alex > > On 7/24/06, [hidden email] <[hidden email]> wrote: > > Hi all, > > > > > > I'm doing a database for XML Schema with OPS and eXist. At the > > moment, i can upload a XML Schema in the eXist database (with a given > > collection). However, I would like to choose the collection (to put my > > XML Schema) among the exist collection. How do that ??? > > > > > > Thanks a lot > > > > > > Damien. > > > > > > > > > > -- > > 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 > > > -- 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 |
Alex:
this is very neat, avoids having to write a whole pipeline to update the db. many thanks for the tip! Pascal Alessandro Vernet wrote: Hi Damien, -- 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
|
Hi Pascal,
Yes, I only started using this a few months ago (I am sure that many here have been using this before!), and find this method particularly elegant. Like you say, the main benefit is that like you don't need anymore to write pipelines to perform CRUD operations. But it makes things simpler in other ways: * There is no need to learn about the XML:DB processors * If needed for debugging, it is easy to see what is going between the application and the database with a simple HTTP traffic analyzer (like tcpmon) * It is easy to access errors returned by eXist from XForms with the event('body') function Alex On 7/27/06, Pascal Heus <[hidden email]> wrote: > > Alex: > this is very neat, avoids having to write a whole pipeline to update the > db. > many thanks for the tip! > Pascal > > Alessandro Vernet wrote: > Hi Damien, > > With the eXist REST interface, you can do this directly from XForms > with a submission that looks like: > > <xforms:submission id="save" ref="instance('doc')" > action="/exist/rest/ccm/{xpath to collection}/{xpath to doc}" > method="put" replace="none" xxforms:username="admin"/> > > Note that method is 'put', which will insert or update a document in > the database. Also note the attribute value template expressions in > 'action'. Those are XPath expressions that let you dynamically create > a URL. > > Alex > > On 7/25/06, Peymirat Damien <[hidden email]> wrote: > > Hi Alex, > > > In fact, I would like to put my document in a collection which already > exist and which I have chosen in the form. However, I can't see how to > recover the name of the collections to propose them in my form. Have you got > an idea ?? > > > Thank you > > > Damien. > > > > > > -----Message d'origine----- > De : [hidden email] [mailto:[hidden email]] De la part de Alessandro > Vernet > Envoyé : mardi 25 juillet 2006 04:14 > À : [hidden email] > Objet : Re: [ops-users] eXist database > > > Hi Damien, > > Could you clarify what the problem is with the collection? If you are using > the eXist REST API, you can insert a document into a collection in eXist > from XPL with: > > <p:processor name="oxf:pipeline"> > <p:input name="config" > href="oxf:/ops/utils/submit.xpl"/> > <p:input name="submission"> > <xforms:submission method="put" > action="/exist/rest/db/collection/document"/> > </p:input> > <p:input name="request"> > <document>...</document> > </p:input> > <p:output name="response" id="dummy"/> > </p:processor> > <p:processor name="oxf:null-serializer"> > <p:input name="data" href="#dummy"/> > </p:processor> > > Alex > > On 7/24/06, [hidden email] > <[hidden email]> wrote: > > Hi all, > > > > > > I'm doing a database for XML Schema with OPS and eXist. At the > > moment, i can upload a XML Schema in the eXist database (with a given > > collection). However, I would like to choose the collection (to put my > > XML Schema) among the exist collection. How do that ??? > > > > > > Thanks a lot > > > > > > Damien. > > > > > > > > > > -- > > 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 > > > > > > > ________________________________ > > -- 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 > > > > -- > 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 |