From SO (and the fine manual), the solution is to use: basex -i w3school_data titles.xq

Very interesting. I'm sure this can be piped or simply written to a file, but is there a particularly "basex" method? Not to just return a result but write that result back to basex.


thanks,

Thufir

On 2019-10-06 11:53 p.m., thufir wrote:
how do I specify a database for a .xq file to use?

a simple FLOWR:

thufir@dur:~/basex/w3$
thufir@dur:~/basex/w3$ basex titles.xq
[warning] /usr/bin/basex: Unable to locate /usr/share/java/jing.jar in /usr/share/java
<title lang="en">Learning XML</title>
<title lang="en">XQuery Kick Start</title>thufir@dur:~/basex/w3$
thufir@dur:~/basex/w3$
thufir@dur:~/basex/w3$ cat titles.xq
for $x in doc("books.xml")/bookstore/book
where $x/price>30
order by $x/title
return $x/title
thufir@dur:~/basex/w3$

(from w3schools)

thanks,

Thufir

Reply via email to