Hello and happy Friday --
I'm using BaseX 11.9.
I have a processing chain of queries that takes some XHTML documents and loads them into a DB. Another query reads that DB, merges the documents, and writes the merged version to disk.
From the disk copy, I create a DB of the merged content, and run another query to update that. (Changing the image references.)
I then I use another query to write the updated DB back out to disk.
If I create the DB of the merged content with the BaseX GUI "new database" dialog, everything works.
If I create the DB of the merged content using
db:create('mergedChapters', file:children($mergedDir), (), map { 'ftindex': true(), 'casesens': true(), 'createfilter': '*.html' })
I get a database and I can use db:get() to query it; for example,
db:get('mergedChapters')//*:img
from a GUI editor window gives me the expected result. (I also get the expected "you can't do that" error if I make the DB the context DB and attempt to run the "load the merged version" query again.)
When I try to run the "update the image references" query (also from a GUI editor window, and also using db:get() to access the DB) after creating the mergedChapters dB from XQuery, it does NOT work. So far as I can tell, it doesn't alter the DB at all.
I'm very sure I'm using the same database name; it's been copied out of the update-the-image-references query. I don't see an option to make the db changeable in the db:create() options.
Any suggestions?
Thanks!
Graydon