CLI issue with 8.0.1
Monday, 23 February 2015 · 5 messages · last reply 10 Mar 2015
ML
Marco Lettere23 Feb 2015 16:44 #
Hello all,
I'm unable to execute the example from documentation:
bin/basex -b$v=example "declare variable $v external; $v"
IT gives this exception:
Stopped at ., 1/19:
[XPST0003] Expecting '$', found 'e'.
Any clues?
Regards,
MArco.
DK
Dirk Kirsten23 Feb 2015 17:56 #
Hi Marco,
I guess you run this as a shell command on a unix machine. $ is normally used for variables, so if you execute in from the shell directly, you might have to escape the dollar sign using \, i.e. it would be
bin/basex -b\$v=example "declare variable \$v external; \$v"
Cheers
Dirk
Quoted text · Marco Lettere · 14 lines
On 02/23/2015 04:44 PM, Marco Lettere wrote: > Hello all, > I'm unable to execute the example from documentation: > > bin/basex -b$v=example "declare variable $v external; $v" > > IT gives this exception: > > Stopped at ., 1/19: > [XPST0003] Expecting '$', found 'e'. > > Any clues? > Regards, > MArco.
--
Dirk Kirsten, BaseX GmbH, http://basexgmbh.de
|-- Firmensitz: Blarerstrasse 56, 78462 Konstanz
|-- Registergericht Freiburg, HRB: 708285, Geschäftsführer:
| Dr. Christian Grün, Dr. Alexander Holupirek, Michael Seiferle `-- Phone: 0049 7531 28 28 676, Fax: 0049 7531 20 05 22
ML
Marco Lettere24 Feb 2015 09:38 #
Oh, thanks. Completely overlooked that. Will try.
In the meantime is it possible, somehow, to parametrize calls to .bsx scripts when called through the RUN command from inside another .bsx?
Thanks,
Marco.
Quoted text · Dirk Kirsten · 23 lines
On 23/02/2015 17:56, Dirk Kirsten wrote: > Hi Marco, > > I guess you run this as a shell command on a unix machine. $ is normally used for variables, so if you execute in from the shell directly, you might have to escape the dollar sign using \, i.e. it would be > > bin/basex -b\$v=example "declare variable \$v external; \$v" > > Cheers > Dirk > On 02/23/2015 04:44 PM, Marco Lettere wrote: >> Hello all, >> I'm unable to execute the example from documentation: >> >> bin/basex -b$v=example "declare variable $v external; $v" >> >> IT gives this exception: >> >> Stopped at ., 1/19: >> [XPST0003] Expecting '$', found 'e'. >> >> Any clues? >> Regards, >> MArco.
CG
Christian Grün24 Feb 2015 11:37 #
Hi Marco,
Quoted text · Marco Lettere · 2 lines
> In the meantime is it possible, somehow, to parametrize calls to .bsx > scripts when called through the RUN command from inside another .bsx?
We are not quite sure where we should start and end with this, as it could also be nice to have conditions or try/catch clauses. On the other hand, we want to avoid creating a completely new scripting language..
But we already had some thoughts on how to best introduce
parametrization in our command script syntax. Open questions are for example how parameters should be encoded to avoid ambiguities (example: $x could be an external command line parameter or part of an XQuery expression.. etc.).
We are glad to get more contributions on this; your suggestions are welcome!
Christian
OJ
Olivier Jeulin10 Mar 2015 15:54 #
Hi,
Doh! Mea culpa: I made an error in the name of the parameter (not the one in the example above), so of course the binding never worked.
All of the syntax works (in GNU/linux's bash ), except
-b"$db-name=Value" because the shell will interpret $dp, so one must use instead:
-b'$db-name=Value'
2015-03-05 10:54 GMT+01:00 Olivier Jeulin <olivier.jeulin.work at gmail.com>:
Quoted text · Christian Grün · 35 lines
> Hello, > > I'm also strugling to pass parameters: > in my XQuery : > declare variable $db-name external; > I tried, following the documentation “-b$v=example” : > basexclient script.xq -b\$db-name=Value > basexclient script.xq -b"$db-name=FichiersBase" > basexclient script.xq -bdb-name=Value > basexclient script.xq -b"db-name=Value" > > and everytime: > [XPDY0002] No value assigned to $db-name. > > What's the correct syntax???! > > > 2015-02-23 16:44 GMT+01:00 Marco Lettere <marco.lettere at dedalus.eu>: > >> Hello all, >> I'm unable to execute the example from documentation: >> >> bin/basex -b$v=example "declare variable $v external; $v" >> >> IT gives this exception: >> >> Stopped at ., 1/19: >> [XPST0003] Expecting '$', found 'e'. >> >> Any clues? >> Regards, >> MArco. >> > >
Written for BaseX 8.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery