DROP DB oshb-morphology
CREATE DB oshb-morphology
ADD ./morphhb/wlc
SET WRITEBACK true
RUN ./xquery/merge-proper-nouns-oshb.xq
EXPORT ./out
XQUERY ./xquery/mappings.xq
It's not a problem with databases that are not open, I open databases explicitly in mappings.xq, e.g. db:open("oshb-morphology") and the same query works fine from the GUI with no databases explicitly opened.
Jonathan
Hi Jonathan,
> ...
> XQUERY ./xquery/merge-proper-nouns-oshb.xq
I don’t have access to the query file you want to evaluate, but I
assume your command script should work if you replace XQUERY with the
RUN command [1].
You can skip the WRITEBACK option if you perform updates on database.
It is only required to update local files [2]:
XQUERY file:write(file:base-dir() || 'example.xml', <a/>)
SET WRITEBACK true
XQUERY insert node <b/> into doc('example.xml')/*
XQUERY doc('example.xml')
Hope this helps,
Christian
[1] https://docs.basex.org/wiki/Commands#RUN
[2] https://docs.basex.org/wiki/Options#WRITEBACK