I'm new to XQUERY so perhaps I misunderstand how to do what I want. I'm trying to pass an external value to a variable in the query. I declared the variable as external at the top. Like this: declare variable $inputstud as xs:string* external;
My understanding is that I now execute the program like this
java -cp basex-6.8-SNAPSHOT.jar org.basex.BaseX ~/MyDocuments/Dropbox/student_ind_detail.xq -binputstud=900426517
then in the where of my query I do where $u/ID eq $x/USERID and $u/IDNUMBER eq $inputstud
Unfortunately, for some reason this doesn't work. I'd like to try this in the gui of basex to see if I can figure out what has gone wrong, but I can't figure out how to pipe external variable to the Gui, is there a way. Thanks Randy
Hi Randy,
java -cp basex-6.8-SNAPSHOT.jar org.basex.BaseX ~/MyDocuments/Dropbox/student_ind_detail.xq -binputstud=900426517
then in the where of my query I do where $u/ID eq $x/USERID and $u/IDNUMBER eq $inputstud
Unfortunately, for some reason this doesn't work.
What's the problem here?
I'd like to try this in the gui of basex to see if I can figure out what has gone wrong, but I can't figure out how to pipe external variable to the Gui, is there a way.
Yes, that's possible: you can type "set bindings" command in the input field, as shown in the screenshot. Commas can be used as delimiters if several variables are to be assigned.
Hope this helps, Christian
Christian, Thanks for that, it worked great. Though for some reason the command line still isn't working even though it does through the GUI. But another related question, If I want to set more than one variable how do I do it? separating set bindings commands with a ; seem only to invoke the last one, not the first
Thanks in advance Randy
On Sat, Oct 1, 2011 at 2:01 PM, Christian Grün christian.gruen@gmail.comwrote:
Hi Randy,
java -cp basex-6.8-SNAPSHOT.jar org.basex.BaseX ~/MyDocuments/Dropbox/student_ind_detail.xq -binputstud=900426517
then in the where of my query I do where $u/ID eq $x/USERID and $u/IDNUMBER eq $inputstud
Unfortunately, for some reason this doesn't work.
What's the problem here?
I'd like to try this in the gui of basex to see if I can figure out what has gone wrong, but I
can't
figure out how to pipe external variable to the Gui, is there a way.
Yes, that's possible: you can type "set bindings" command in the input field, as shown in the screenshot. Commas can be used as delimiters if several variables are to be assigned.
Hope this helps, Christian
HI All, Its working, turns out the GUI database was just older. But still wondering if I there is a way I can pass two arguments to the GUI Randy
On Sat, Oct 1, 2011 at 4:10 PM, Randy reed randywreed@gmail.com wrote:
Christian, Thanks for that, it worked great. Though for some reason the command line still isn't working even though it does through the GUI. But another related question, If I want to set more than one variable how do I do it? separating set bindings commands with a ; seem only to invoke the last one, not the first
Thanks in advance Randy
On Sat, Oct 1, 2011 at 2:01 PM, Christian Grün christian.gruen@gmail.comwrote:
Hi Randy,
java -cp basex-6.8-SNAPSHOT.jar org.basex.BaseX ~/MyDocuments/Dropbox/student_ind_detail.xq -binputstud=900426517
then in the where of my query I do where $u/ID eq $x/USERID and $u/IDNUMBER eq $inputstud
Unfortunately, for some reason this doesn't work.
What's the problem here?
I'd like to try this in the gui of basex to see if I can figure out what has gone wrong, but I
can't
figure out how to pipe external variable to the Gui, is there a way.
Yes, that's possible: you can type "set bindings" command in the input field, as shown in the screenshot. Commas can be used as delimiters if several variables are to be assigned.
Hope this helps, Christian
-- Dr. Randall Reed Assistant Professor, Dept. of Philosophy and Religion Appalachian State University
Hi Randy,
Thanks for that, it worked great.
nice to hear..
Its working, turns out the GUI database was just older. But still wondering if I there is a way I can pass two arguments to the GUI
Do you talk about multiple variable bindings? Please see my recent reply below..
Yes, that's possible: you can type "set bindings" command in the input field, as shown in the screenshot. Commas can be used as delimiters if several variables are to be assigned.
..or feel free to ask again if this doesn't answer your question.
Christian
basex-talk@mailman.uni-konstanz.de