console usage
Quoted text · thufir · 2 lines
> > RUN fetch.note.text.xq > Resource "/home/thufir/fetch.note.text.xq" not found.
Is the script located at this path? If not, you will have to change to this directory and start BaseX from there, or you will need to specify the full path.
How can I run this script?
thufir@dur:~/basex$ thufir@dur:~/basex$ basex [warning] /usr/bin/basex: Unable to locate /usr/share/java/jing.jar in /usr/share/java BaseX 9.0.1 [Standalone] Try 'help' to get more information.
Quoted text · 2 lines
> > RUN fetch.note.text.xq
Resource "/home/thufir/fetch.note.text.xq" not found.
Quoted text · 2 lines
> > exit
Have fun. thufir@dur:~/basex$ thufir@dur:~/basex$ cat fetch.note.text.xq
fetch:xml("https://www.w3schools.com/xml/note.xml", map { 'chop': true() })thufir@dur:~/basex$
The script seems to work fine from the GUI.
thanks,
Thufir
Quoted text · Christian Grün · 8 lines
On 2019-01-02 8:07 a.m., Christian Grün wrote: >> > RUN fetch.note.text.xq >> Resource "/home/thufir/fetch.note.text.xq" not found. > > Is the script located at this path? If not, you will have to change to > this directory and start BaseX from there, or you will need to specify > the full path. >
Yes, the script is there:
thufir@dur:~/basex$ thufir@dur:~/basex$ cat fetch.note.text.xq
fetch:xml("https://www.w3schools.com/xml/note.xml", map { 'chop': true() })thufir@dur:~/basex$ thufir@dur:~/basex$ ls -al fetch.note.text.xq -rw-r--r-- 1 thufir thufir 79 Jan 2 07:54 fetch.note.text.xq thufir@dur:~/basex$ thufir@dur:~/basex$ pwd /home/thufir/basex thufir@dur:~/basex$
Yet my attempts to execute from the console give an error. Thanks for confirming that the error, as it appears, is that the file cannot be found. Makes no sense to me.
The script itself works from the GUI:
https://stackoverflow.com/questions/54009208/
thanks,
Thufir
ps: I missed your earlier reply but have fixed my gmail filters.
Quoted text · thufir · 2 lines
On 2019-01-02 8:01 a.m., thufir wrote: > Resource "/home/thufir/fetch.note.text.xq" not found.
Ohhhh
My pwd is /home/thufir/basex which is where the script is..
Quoted text · Christian Grün · 8 lines
On 2019-01-02 8:07 a.m., Christian Grün wrote: >> > RUN fetch.note.text.xq >> Resource "/home/thufir/fetch.note.text.xq" not found. > > Is the script located at this path? If not, you will have to change to > this directory and start BaseX from there, or you will need to specify > the full path. >
You were spot on:
thufir@dur:~/basex$ thufir@dur:~/basex$ basex [warning] /usr/bin/basex: Unable to locate /usr/share/java/jing.jar in /usr/share/java BaseX 9.0.1 [Standalone] Try 'help' to get more information.
Quoted text · Christian Grün · 2 lines
> > RUN fetch.note.text.xq
<note>
<to>Tove</to>
<from>Jani</from>
<heading>Reminder</heading>
<body>Don't forget me this weekend!</body>
</note>
Query "fetch.note.text.xq" executed in 1433.71 ms.Quoted text · Christian Grün · 2 lines
> > exit
Enjoy life. thufir@dur:~/basex$
Thanks. And, enjoy life :)
Written for BaseX 9.1. BaseX may have changed since: please check the current documentation.