testing external variables in the gui
Saturday, 1 October 2011 · 5 messages · last reply 2 Oct 2011
CG
Hi Randy,
Quoted text · Randy reed · 7 lines
> 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?
Quoted text · Randy reed · 3 lines
> 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
RR
Randy reed1 Oct 2011 21:55 #
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 $inputstudUnfortunately, 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
--
Dr. Randall Reed
Assistant Professor, Dept. of Philosophy and Religion
Appalachian State University
RR
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 at gmail.com>wrote:
Quoted text · Christian Grün · 24 lines
> 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
RR
Randy reed2 Oct 2011 00:42 #
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
Quoted text · Randy reed · 45 lines
On Sat, Oct 1, 2011 at 4:10 PM, Randy reed <randywreed at 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 at gmail.com>wrote: > >> 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 >
--
Dr. Randall Reed
Assistant Professor, Dept. of Philosophy and Religion
Appalachian State University
CG
Christian Grün2 Oct 2011 22:42 #
Hi Randy,
Quoted text · Randy reed · 1 line
>> Thanks for that, it worked great.
nice to hear..
Quoted text · Randy reed · 2 lines
> 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..
Quoted text · Randy reed · 3 lines
> 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
Written for BaseX 6.7. BaseX may have changed since: please check the current documentation.
⚡Generated with XQuery