db:replace modified date

Monday, 14 August 2017 · 2 messages
KS
Kendall Shaw14 Aug 2017 04:18 #

After debugging a query for a while, I figured out that db:replace isn’t changing the modification date of an XML resource, when the content hasn’t changed. The case is like this:

db:replace(‘db’, ‘abc.xml’, doc(‘file:/tmp/abc.xml’))

Is that normal, or do I have an option set that results in that behavior? ADDCACHE is false.

Kendall

CG
Christian Grün14 Aug 2017 11:03 #

Exactly: Nothing will be replaced in BaseX if your source and target XML node is identical (this holds true for both documents as well as any other node in a document).

Please note that XML documents have no individual timestamps in BaseX. Instead the timestamp of the database will be changed if nodes are changed.

Cheers, Christian

Quoted text · Kendall Shaw · 19 lines
On Mon, Aug 14, 2017 at 4:18 AM, Kendall Shaw <kendall.shaw at workday.com> wrote: > After debugging a query for a while, I figured out that db:replace isn’t > changing the modification date of an XML resource, when the content hasn’t > changed. The case is like this: > > > > db:replace(‘db’, ‘abc.xml’, doc(‘file:/tmp/abc.xml’)) > > > > Is that normal, or do I have an option set that results in that behavior? > ADDCACHE is false. > > > > Kendall > >

⚡Generated with XQuery