Hi,
Context: DB name A Collection B File C.xml with <p id="i1">Hello</p>
In BaseX Gui, DB A is opened. In the Properties window, browse to the file C.xml, say you want to add in under B and click Add. Repeat the operation (to replace C.xml, with a new update C.xml)
In BaseX Gui, try: for $x in /*[@id='i1'] return $x
You'll get this: <p id="i1">Hello</p> <p id="i1">Hello</p>
If you try this: for $x in /*[@id='i1'] return $x/base-uri()
You'll get A/B/C.xml A/B/C.xml
Applying db:optimize won't change anything.
Basically, it looks like the content of the file is appended to the existing file. Expectation is that it should replace it.
Side effect: When we open the file in XML Oxygen through WebDAV, the file appears to be empty.