DROP DB oshb-morphology
CREATE DB oshb-morphology
ADD ./morphhb/wlc
SET WRITEBACK true
XQUERY ./xquery/merge-proper-nouns-oshb.xq
EXPORT ./out
On 28.06.2021 20:54, Jonathan Robie wrote:
> I decided to try creating some command files to simplify administration:
>
> https://docs.basex.org/wiki/Commands#String_Syntax
> <https://docs.basex.org/wiki/Commands#String_Syntax>
>
> I was surprised that this did not work:
>
> % cat foo.bsx
>
> CREATE DB test
>
> ADD TO embedded.xml <root>embedded</root>
>
> # run query
>
> XQUERY <hits>{ count(//text()) }</hits>
>
> CLOSE
>
>
> % basex foo.bsx
>
> Stopped at /.../foo.bsx, 1/9:
>
> [XPST0003] Unexpected end of query: 'DB test...'.
I think the suffix of the file needs to be ".bxs" to be treated as a
command sequence, otherwise it is treated as XQuery code. So you have
the wrong file suffix.