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
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
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@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@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk
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/
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@gmail.comwrote:
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/
Dear Maud,
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
On Tue, Feb 14, 2012 at 7:03 PM, Christian Grün christian.gruen@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@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@mailman.uni-konstanz.de