Hi,
When using the BaseX-7.0.2pre-20111030 GUI, and try to create a new database, I fill in the form with the name and location, then press OK. Some files seem to be created, then after a few seconds I get the following error:
"TestInputs/bug/bug80.xml" (Line 3): "xbug80.dtd" could not be parsed.
I don't know what it means in this context. Any idea?
Regards,
Hi Florent,
When using the BaseX-7.0.2pre-20111030 GUI, and try to create a new database, I fill in the form with the name and location, then press OK. Some files seem to be created, then after a few seconds I get the following error:
"TestInputs/bug/bug80.xml" (Line 3): "xbug80.dtd" could not be parsed.
can you parse your directory if you activate the checkbox "Skip corrupt files" in the create dialog?
Christian
Christian Grün wrote
Hi,
"TestInputs/bug/bug80.xml" (Line 3): "xbug80.dtd" could not be parsed.
can you parse your directory if you activate the checkbox "Skip corrupt files" in the create dialog?
Thanks for your fast response, as usual! Actually it was a misunderstood on my side. I didn't understood the meaning of the input file/directory option. I just wanted to create an empty database, so I pointed BaseX to an empty dir (shouldn't there be an option to create an empty database?)
So I created successfully the database now, thanks! I am now trying to add an XQuery file to the database (in order to be referenced by a query I evaluate through the REST interface, by an import statement). But using the "Database > Add documents..." menu item, it does not take the file into account (within the path field, I put directly the direct path to the XQuery lib module).
Any idea?
Regards,
Florent,
(shouldn't there be an option to create an empty database?)
No problem... Just don't enter any input file/directory.
So I created successfully the database now, thanks! I am now trying to add an XQuery file to the database (in order to be referenced by a query I evaluate through the REST interface, by an import statement). But using the "Database > Add documents..." menu item, it does not take the file into account (within the path field, I put directly the direct path to the XQuery lib module).
Currently, this is only possible via REST and XQuery, but we are currently enhancing the Add/Delete dialog windows to make this possible via the GUI as well..
Best, Christian
Hi,
Thanks again Christian, I now succeeded to put the query in the database using a PUT request. I've put it in the DB basex-tmp-db at the URI xspec/generate-query-utils.xql (simply using the MIME type application/binary). I am now trying to figure out how to import it from a query which is evaluated trough a POST request in the REST API.
I am not quite sure how to adapt the AT location hint. I tried different combination, with and without the DB name at the end of the URI for the POST request (to evaluate the query), and at the front of the AT location hint. But all combinations return a "[XQST0059] Module not found", and I didn't find the documentation about that on the wiki (I guess I just missed it...)
Thanks for your help, regards,
Hi Florent,
I am not quite sure how to adapt the AT location hint. I tried different combination, with and without the DB name at the end of the URI for the POST request (to evaluate the query), and at the front of the AT location hint. But all combinations return a "[XQST0059] Module not found", and I didn't find the documentation about that on the wiki (I guess I just missed it...)
Good point; the query path is not set to the correct location yet. As I didn't find out how to fix this quickly and cleanly, I've added a GitHub entry:
https://github.com/BaseXdb/basex/issues/256
Your query should work if you put them into the default path, specified by the HTTPPATH variable in .basex, and run it the following way:
http://host:port/rest?run=query.xq
Hope this helps, more questions are welcome, Christian
Christian Grün wrote:
Hi Christian,
Good point; the query path is not set to the correct location yet. As I didn't find out how to fix this quickly and cleanly, I've added a GitHub entry:
Just to be sure, even though I guess in this case that's most likely that the same problem happens in both cases, I was trying to evaluate the query through a POST, not a GET.
Your query should work if you put them into the default path, specified by the HTTPPATH variable in .basex, and run it the following way:
Well, I used the POST verb because the client does generate the query to evaluate and it could become very tricky to try to first PUT them somewhere in the database.
So just to summarise my problem: I'd like to have a library module on the server and to evaluate a query through a POST, which imports the library module standing on the server.
Please tell me if you want me trying to get a minimalist repro.
Many thanks! Regards,
Just to be sure, even though I guess in this case that's most likely that the same problem happens in both cases, I was trying to evaluate the query through a POST, not a GET.
Good to know.. I have now updated the REST code to always set HTTPPATH as query path. This way, server-side modules should be found in the HTTPPATH directory, no matter if you use GET or POST, or if you specify a database. Please have a look at the latest snapshot..
http://files.basex.org/releases/latest/
Thanks, Christian
basex-talk@mailman.uni-konstanz.de