Hi Joshua,
I write the function in lib.xqm as a standalone query. All it does it add some attributes to each testcase before importing the content into the database. Forgive me if this is hard to read, it was my first attempt at making a function which updates some records and then imports in the same query.
Looks fine. Thanks for sending code that can be parsed out-of-the-box.
I am now trying to write a bulk import, which is import-all.xq and this is not working. I receive a message about updates not being written back. My first attempt to write that function inside of a for-each also failed.
This warning is only shown on command line. It simply indicates that your updates won’t be propagated back to the original files.
If that’s what you would like to achieve, you can use the command-line argument -u (see [1]). If something else is not working as expected, feel free to provide us with more details.
Best, Christian