Hi,
With the 8.5 branch i've started seeing the following error a lot lately.
[XUDY0016] Documents in path 'docbook/chapters/mu.xml' can only be replaced once.
This is the example function I used to trigger this.
declare %updating function local:import() { for $file in file:list($srcdir, true(), '*.xml') let $path := $srcdir || $file where not(file:is-dir($path)) return db:replace('docbook', $file, doc(trace($path,'X: '))) };
(lifted from the BaseX documentation example on file:list)
Note that the path exists and contains several XML files. It happened a lot too on a work project so I've seen this in several situations now. On the latter project it went away after going back to a 8.4 build. Sorry for not reporting sooner as I was under severe time pressure at the time.
I tried switching MIXUPDATES on and off. That doesn't make a difference.
I have two XML files in this $srcdir and when I put a trace around $path I see that both of them are listed before it stops with an error message that includes the path of the first one.
X: "/Users/marcvangrootel/projects/xml/book/chapters/mu.xml" X: "/Users/marcvangrootel/projects/xml/book/chapters/test.xml" Stopped at /Users/marcvangrootel/projects/xml/c4/test/demo.xq, 30/20: [XUDY0016] Documents in path 'docbook/chapters/mu.xml' can only be replaced once.
Odd!
--Marc