Yes, that is shorter and more readable.  Thanks!

And if I don't have to worry about setting options, that's nicely convenient. Again, thanks!

Jonathan

On Fri, Jul 16, 2021 at 8:53 AM Christian Grün <christian.gruen@gmail.com> wrote:
Thanks, Jonathan, for the code snippet.

>  replace value of node $ketiv/@type with fn:string-join(($ketiv/@type, "x-ketiv"), " ")

This statement should be completely safe, no matter which options you
have set. If you want to avoid if/then/else, you can also do the
following (but it’s not much shorter):

  delete node $ketiv/@type,
  insert node attribute type { string-join(($ketiv/@type, "x-ketiv"),
" ") } into $ketiv