Great, thanks! 

Jonathan

On Tue, Jun 29, 2021 at 10:22 AM Christian Grün <christian.gruen@gmail.com> wrote:
Hi Jonathan,

> SET WRITEBACK true
> RUN ./xquery/merge-proper-nouns-oshb.xq

I see you are still using WRITEBACK… Does your query file
'merge-proper-nouns-oshb.xq' access any local files that you are
updating?

> XQUERY ./xquery/mappings.xq

Once again, you may need to replace XQUERY with RUN. If you use
XQUERY, you must supply the query itself after the command.

> how do I run a query that is in a file and write the results back to a different file?

You could use the File Module for that, or fn:put. If you want to
write the result of a query evaluation to a file, you’ll probably need
to do this on command line for all results returned by a script>

basex -o result.xml script.bxs

Hope this helps,
Christian