no value assigned to external variables in xq when running bxs->bxs->xq
Friday, 25 May 2018 · 3 messages · last reply 29 May 2018
FT
Freihalter Thomas25 May 2018 08:32 #
Hello,
I am using basex 9.0.1
and have this 3 files:
test.xq:
declare variable $test external; $test
test.bxs:
<commands>
<set option="BINDINGS">test=foo</set>
<run file="test.xq"/>
</commands>run.bxs:
<commands>
<run file="test.bxs"/>
</commands>Running test.bxs is okay
basex -v test.bxs
BINDINGS: test=foo
foo
Query "test.xq" executed in 5.4 ms.
basex -v run.bxs
BINDINGS: test=foo
Stopped at test.xq, 1/18:
[XPDY0002] No value assigned to $test.
It look like the bindings in test.bxs get lost, when executing the superior run.bxs. Is there any solution solving this problem? 8.6.7 does not work as well.
regard
Thomasecho "declare variable \$test external; \$test" > test.xq;
echo "<commands><set option=\"BINDINGS\">test=foo</set><run
file=\"test.xq\"/></commands>" > test.bxs;
echo "<commands><run file=\"test.bxs\"/></commands>" > run.bxs;
basex -v test.bxs;
basex -v run.bxsCG
Christian Grün25 May 2018 14:00 #
Hi Thomas,
Thanks for the reproducible example, always appreciated. I have added an issue for that [1], and I’ll look into it soon.
Best,
Christian
[1] https://github.com/BaseXdb/basex/issues/1572
Quoted text · Freihalter Thomas · 44 lines
On Fri, May 25, 2018 at 8:32 AM, Freihalter Thomas <thomas.freihalter at my-box.de> wrote: > Hello, > I am using basex 9.0.1 > and have this 3 files: > > test.xq: > declare variable $test external; $test > > test.bxs: > <commands> > <set option="BINDINGS">test=foo</set> > <run file="test.xq"/> > </commands> > > run.bxs: > <commands> > <run file="test.bxs"/> > </commands> > > Running test.bxs is okay > basex -v test.bxs > BINDINGS: test=foo > foo > Query "test.xq" executed in 5.4 ms. > > basex -v run.bxs > BINDINGS: test=foo > Stopped at test.xq, 1/18: > [XPDY0002] No value assigned to $test. > > It look like the bindings in test.bxs get lost, when executing the > superior run.bxs. Is there any solution solving this problem? > 8.6.7 does not work as well. > > regard > Thomas > > echo "declare variable \$test external; \$test" > test.xq; > echo "<commands><set option=\"BINDINGS\">test=foo</set><run > file=\"test.xq\"/></commands>" > test.bxs; > echo "<commands><run file=\"test.bxs\"/></commands>" > run.bxs; > basex -v test.bxs; > basex -v run.bxs
CG
Christian Grün29 May 2018 14:09 #
The issue could be resolved (variables specified via
BINDINGS will now only be resolved at compile time); a new snapshot is available.Quoted text · Christian Grün · 59 lines
On Fri, May 25, 2018 at 2:00 PM, Christian Grün <christian.gruen at gmail.com> wrote: > Hi Thomas, > > Thanks for the reproducible example, always appreciated. I have added > an issue for that [1], and I’ll look into it soon. > > Best, > Christian > > [1] https://github.com/BaseXdb/basex/issues/1572 > > > > On Fri, May 25, 2018 at 8:32 AM, Freihalter Thomas > <thomas.freihalter at my-box.de> wrote: > > Hello, > > I am using basex 9.0.1 > > and have this 3 files: > > > > test.xq: > > declare variable $test external; $test > > > > test.bxs: > > <commands> > > <set option="BINDINGS">test=foo</set> > > <run file="test.xq"/> > > </commands> > > > > run.bxs: > > <commands> > > <run file="test.bxs"/> > > </commands> > > > > Running test.bxs is okay > > basex -v test.bxs > > BINDINGS: test=foo > > foo > > Query "test.xq" executed in 5.4 ms. > > > > basex -v run.bxs > > BINDINGS: test=foo > > Stopped at test.xq, 1/18: > > [XPDY0002] No value assigned to $test. > > > > It look like the bindings in test.bxs get lost, when executing the > > superior run.bxs. Is there any solution solving this problem? > > 8.6.7 does not work as well. > > > > regard > > Thomas > > > > echo "declare variable \$test external; \$test" > test.xq; > > echo "<commands><set option=\"BINDINGS\">test=foo</set><run > > file=\"test.xq\"/></commands>" > test.bxs; > > echo "<commands><run file=\"test.bxs\"/></commands>" > run.bxs; > > basex -v test.bxs; > > basex -v run.bxs >
Written for BaseX 9.0. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery