Thank you. 
I see that all of the WebDAV PUTS to the web app are logged, so I suppose I 
could search logs for updates via WebDAV. 
( And, presumably, I’ll be the only one doing direct DB updates via basexgui or 
command line basex, so I’ll just have to discipline myself! ;-)


I was checking this by mounting basex WebDAV volume as a remote filesystem on 
my Mac, which lead me to think that another solution
might be to use Linux DavFS2 to do the same on server  and just use the WebDAV 
volume as the filesystem store — thus there is only 
one canonical copy and keeping them in sync is not an issue. However, while 
testing that, I’m seeing some issues that suggest that won’t
work — I was getting errors from rsync trying to create temp files on the 
destination volume ( WebDAV ). And also, one of the reasons for
wanting file system access is to track changes in git. I looks like I can keep 
the .git files external to that filesystem by using —git-dir= and 
work-tree= options, but this may need more testing. It would simplify thinks if 
I don’t have to worry about keeping filesystem and database in sync. 


— Steve M. 



> On Aug 19, 2019, at 10:36 AM, Christian Grün <christian.gr...@gmail.com> 
> wrote:
> 
> Hi Steven,
> 
> Finally a quick response.
> 
> In a nutshell: “You are right” ;) I think you already summarized the
> status quo pretty well: Timestamps are only available for the whole
> database, and for binary files (for which simply the OS timestamp will
> be returned).
> 
> In our applications, we mostly use RESTXQ to organize additional meta
> data properties for documents. They will usually be stored in an
> additional meta data database. I agree this won’t be helpful if you
> use WebDAV and other low-level APIs. Apart from the discussed trigger
> feature, there is another issue that is somewhat related with your
> feature request for organizing document metadata [1]: Various default
> properties could be defined that will always be refreshed
> automatically if a document is created or updated. For now, due to
> lack of time and resources, I’m sorry to say that both issues are
> still on hold.
> 
> Best,
> Christian
> 
> [1] https://github.com/BaseXdb/basex/issues/988
> 
> 
> 
> On Wed, Aug 14, 2019 at 5:12 AM Majewski, Steven Dennis (sdm7g)
> <sd...@virginia.edu> wrote:
>> 
>> 
>> I thought I could use db:list-details($db)/@modified-date to select the 
>> resources that have most recently been updated ( to generate an OAI or RSS 
>> feed ) however, on doing a db:replace of one of the resources, I’m either 
>> not seeing the date change at all, or I’m seeing the modified-date of all of 
>> the resources update together.
>> 
>> 
>> I find an explanation in the archives:
>> https://www.mail-archive.com/basex-talk@mailman.uni-konstanz.de/msg09668.html
>> 
>>> 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.
>>> 
>> 
>> 
>> 
>> Do I parse that correctly in saying that when I try to replace a document 
>> with an identical document, it doesn’t register as an update, but when I do 
>> change and update the document, it changes the timestamp for the whole 
>> database, and there is no timestamp for individual resources ?
>> 
>> So I assume that if I want to track updated resources, I would have to 
>> either add timestamps to the documents themselves, or else track this info 
>> somewhere else, maybe in SQL and use sql: functions from within BaseX.
>> 
>> Maybe best method is to add timestamp as a processing instruction or comment 
>> to avoid any changes to the body of the document:
>> insert node processing-instruction modifiedDateTime { current-dateTime()} as 
>> first into $D
>> 
>> That would work if doing the updates from an XQuery script and calling 
>> db:replace and then adding the timestamp,
>> However, not very reliable if the resource can be updated by another method 
>> ( WEBDAV for example ) unless there is a way to trigger xquery function on 
>> update. I find from searching the mailing list archives a link to an issue 
>> discussing adding database triggers, but it appears to be on hold:
>> 
>> https://github.com/BaseXdb/basex/issues/1082
>> 
>> Any news on this or suggestions of alternatives ?
>> 
>> 
>> 
>> — Steve Majewski
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to