CHOP=false in a POST request ?

Thursday, 9 February 2012 · 5 messages · last reply 5 Mar 2012
MI
Maud Ingarao9 Feb 2012 14:59 #
Hello, I need BaseX not to chop whitespaces while creating DBs out of my XML texts. I found this post : https://mailman.uni-konstanz.de/pipermail/basex-talk/2010-April/000213.html and this documentation : http://docs.basex.org/wiki/Options#CHOP But could someone please show me how to write it as a REST POST request ? I looked at examples here http://docs.basex.org/wiki/REST#Command_Line but always get a "Nodes must belong to "http://www.basex.org/rest"" error... Thanks a lot !! Maud
-- Maud Ingarao IHPC (UMR 5037) Institut d’histoire de la pensée classique, de l’Humanisme aux Lumières Ecole Normale Supérieure de Lyon - Site Descartes - Bureau R322 15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07 +33 4 37 37 65 79 - maud.ingarao at ens-lyon.fr cerphi.ens-lyon.fr - pensee-classique.ens-lyon.fr institutdesanti.ens-lyon.fr - hyperdonat.ens-lyon.fr mutec-shs.fr - projet-plume.org - ahn.ens-lyon.fr http://www.cahier.paris-sorbonne.fr/ - je suis absente le vendredi - out of office on Fridays -
DK
Dr. Thomas Kupka14 Feb 2012 16:35 #
Dear Maud, the required namespace has changed. With BaseX version 7.0.2 you have to write: <query xmlns='http://www.basex.org/rest'> With BaseX version 7.1 you have to write: <query xmlns='http://basex.org/rest'> (without www like in the command line example) Kind regards Thomas in the command line examples the name space is wrong
Quoted text · Maud Ingarao · 38 lines
Am 09.02.2012 um 14:59 schrieb Maud Ingarao: > Hello, > > I need BaseX not to chop whitespaces while creating DBs out of my XML texts. > > I found this post : > https://mailman.uni-konstanz.de/pipermail/basex-talk/2010-April/000213.html > and this documentation : > http://docs.basex.org/wiki/Options#CHOP > > But could someone please show me how to write it as a REST POST request ? > I looked at examples here > http://docs.basex.org/wiki/REST#Command_Line > but always get a "Nodes must belong to "http://www.basex.org/rest"" error... > > Thanks a lot !! > Maud > > > > -- > Maud Ingarao > IHPC (UMR 5037) > Institut d’histoire de la pensée classique, de l’Humanisme aux Lumières > Ecole Normale Supérieure de Lyon - Site Descartes - Bureau R322 > 15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07 > +33 4 37 37 65 79 - maud.ingarao at ens-lyon.fr > > cerphi.ens-lyon.fr - pensee-classique.ens-lyon.fr > institutdesanti.ens-lyon.fr - hyperdonat.ens-lyon.fr > mutec-shs.fr - projet-plume.org - ahn.ens-lyon.fr > http://www.cahier.paris-sorbonne.fr/ > > - je suis absente le vendredi - out of office on Fridays - > _______________________________________________ > BaseX-Talk mailing list > BaseX-Talk at mailman.uni-konstanz.de > https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
CG
Christian Grünin reply to Maud Ingarao, 9 Feb 2012, 14:5914 Feb 2012 19:03 #
Dear Maud, sorry for the delay... here's finally some feedback!
Quoted text · Maud Ingarao · 3 lines
> I need BaseX not to chop whitespaces while creating DBs out of my XML texts. > [...] > But could someone please show me how to write it as a REST POST request ?
Thanks for this hint. We have decided to enhance our REST API to allow the specification of database options. You can now add the "chop=false" parameter to stop the whitespace normalization of documents (I've updated the documentation [1] and latest releases [2]).
Quoted text · Maud Ingarao · 3 lines
> I looked at examples here > http://docs.basex.org/wiki/REST#Command_Line > but always get a "Nodes must belong to "http://www.basex.org/rest"" error...
As Thomas already noted, the namespace has changed from 7.0.2 to 7.1 (and will now stay as it is ;). Hope this helps, Christian [1] http://docs.basex.org/wiki/REST [2] http://files.basex.org/releases/latest/
MI
Maud Ingarao5 Mar 2012 13:41 #
Hallo Christian und Thomas, Sorry for the delay too ! I was on holidays and then badly ill. something attacked my poor lungs during almost 15 days :( It almost works now, the namespace is ok, but it seems I still write something wrong somewhere... curl -i -X POST -H "Content-Type: application/xml" -d "<command xmlns=' http://www.basex.org/rest'><text>SET CHOP false ; CREATE DATABASE DonTest DonEun/DonEun.xml</text></command>" "mingarao:********@ basex.tge-adonis.fr/rest/DonTest" I thik the path is wrong or something like that... All the best, Maud On Tue, Feb 14, 2012 at 7:03 PM, Christian Grün <christian.gruen at gmail.com>wrote:
Quoted text · Christian Grün · 29 lines
> Dear Maud, > > sorry for the delay... here's finally some feedback! > > > I need BaseX not to chop whitespaces while creating DBs out of my XML > texts. > > [...] > > But could someone please show me how to write it as a REST POST request ? > > Thanks for this hint. We have decided to enhance our REST API to allow > the specification of database options. You can now add the > "chop=false" parameter to stop the whitespace normalization of > documents (I've updated the documentation [1] and latest releases > [2]). > > > I looked at examples here > > http://docs.basex.org/wiki/REST#Command_Line > > but always get a "Nodes must belong to "http://www.basex.org/rest"" > error... > > As Thomas already noted, the namespace has changed from 7.0.2 to 7.1 > (and will now stay as it is ;). > > Hope this helps, > Christian > > [1] http://docs.basex.org/wiki/REST > [2] http://files.basex.org/releases/latest/ >
-- Maud Ingarao IHPC (UMR 5037) Institut d’histoire de la pensée classique, de l’Humanisme aux Lumières Ecole Normale Supérieure de Lyon - Site Descartes - Bureau R322 15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07 +33 4 37 37 65 79 - maud.ingarao at ens-lyon.fr cerphi.ens-lyon.fr - pensee-classique.ens-lyon.fr institutdesanti.ens-lyon.fr - hyperdonat.ens-lyon.fr mutec-shs.fr - projet-plume.org - ahn.ens-lyon.fr http://www.cahier.paris-sorbonne.fr/ - je suis absente le vendredi - out of office on Fridays -
CG
Christian Grün5 Mar 2012 13:49 #
Dear Maud,
Quoted text · Maud Ingarao · 2 lines
> I was on holidays and then badly ill. something attacked my poor lungs > during almost 15 days :(
I'm sorry for that.. Hope you are better again! The following query should do what you need (provided you're using one of the latest snapshots): curl -i -X POST -H "Content-Type: application/xml" -d "<command xmlns='http://basex.org/rest'><text>CREATE DATABASE DonTest DonEun/DonEun.xml</text><option name='chop' value='false'></option></command>" "mingarao:********@basex.tge-adonis.fr/rest" Hope this helps, Christian
Quoted text · Christian Grün · 51 lines
> On Tue, Feb 14, 2012 at 7:03 PM, Christian Grün <christian.gruen at gmail.com> > wrote: >> >> Dear Maud, >> >> sorry for the delay... here's finally some feedback! >> >> > I need BaseX not to chop whitespaces while creating DBs out of my XML >> > texts. >> > [...] >> > But could someone please show me how to write it as a REST POST request >> > ? >> >> Thanks for this hint. We have decided to enhance our REST API to allow >> the specification of database options. You can now add the >> "chop=false" parameter to stop the whitespace normalization of >> documents (I've updated the documentation [1] and latest releases >> [2]). >> >> > I looked at examples here >> > http://docs.basex.org/wiki/REST#Command_Line >> > but always get a "Nodes must belong to "http://www.basex.org/rest"" >> > error... >> >> As Thomas already noted, the namespace has changed from 7.0.2 to 7.1 >> (and will now stay as it is ;). >> >> Hope this helps, >> Christian >> >> [1] http://docs.basex.org/wiki/REST >> [2] http://files.basex.org/releases/latest/ > > > > > -- > Maud Ingarao > IHPC (UMR 5037) > Institut d’histoire de la pensée classique, de l’Humanisme aux Lumières > Ecole Normale Supérieure de Lyon - Site Descartes - Bureau R322 > 15 Parvis René Descartes - BP7000 - 69342 Lyon CEDEX 07 > +33 4 37 37 65 79 - maud.ingarao at ens-lyon.fr > > cerphi.ens-lyon.fr - pensee-classique.ens-lyon.fr > institutdesanti.ens-lyon.fr - hyperdonat.ens-lyon.fr > mutec-shs.fr - projet-plume.org - ahn.ens-lyon.fr > http://www.cahier.paris-sorbonne.fr/ > > - je suis absente le vendredi - out of office on Fridays - >

⚡Generated with XQuery