Liam,
the bug has been fixed [1]; feel free to check out the latest version [2].
Thanks for sharing this, Christian
[1] https://github.com/BaseXdb/basex-api/commit/aaa17f4e408e4e86d0ff3a72a8261acf... [2] https://github.com/BaseXdb/basex-api/blob/master/src/main/perl/BaseXClient.p...
______________________________________________
On Thu, Dec 13, 2012 at 8:29 PM, Liam R E Quin liam@w3.org wrote:
On Thu, 2012-12-13 at 18:30 +0100, Christian Grün wrote:
Hi Liam,
(1) The sample perl files and the perl module implementing the API mention a readme file that explains the methods; does anyone know where one might find such a readme file? It might answer my other question...
The quoted readme.txt file is currently found in the parent directory, which lists all other client APIs [1].
Thank you, this led me to http://docs.basex.org/wiki/Server_Protocol which at least gave a list of methods and what they are expected to do.
(2) if there's an error in my query and I catch the exception, the message I get is about how many milliseconds the query took, not the actual error. I can enclose my Perl script, but I'm wondering if others have seen this?
In Perl, the error message can be retrieved by enclosing the query with eval {...} and printing $@ if an error occurs. This is eg shown in Example.pl. If this does not help, you are invited to send us an example that demonstrates what goes wrong.
Enclosed. When I run this the error I get is always: Database 'rdf' was opened in 0.6 ms.
If I use the commandline BsaeX program on the same query I get this instead (for this same deliberately malformed query): $ ~/packages/basex/BaseX7.3/bin/basexclient Username: admin Password: BaseX 7.3 [Client] Try help to get more information.
open rdf
Database 'rdf' was opened in 0.65 ms.
run /home/liam/tmp/error.xq
Stopped at line 1, column 9 in /home/liam/tmp/error.xq: [XPST0003] Unexpected end of query: 'with syntax err...'.
Liam
-- Liam Quin - XML Activity Lead, W3C, http://www.w3.org/People/Quin/ Pictures from old books: http://fromoldbooks.org/ Ankh: irc.sorcery.net irc.gnome.org freenode/#xml Co-author, 5th edition of "Beginning XML", Wrox, 2012