Hi France, or does it mean that we use db:open but not local queries on the document
obtained
That's probably what it means (if I understood you correctly): By default, you can access both local files as well as database resources with fn:doc and fn: collection. If you disable WITHDB, you must use db:open for accessing databases. Did I get you right? Christian (example below), or since there is a notion of lock, do you mean db:open as
opposed to db:add or db:replace? In short, I lack context to interpret the explanation.
let $current-doc := db:open($lang)/*[@id=x] (: Query document further without db:opened :) let $avaliable-sections := $current-doc/descendant::*[name()=''section][@status !='archived']
From the documentation: WITHDB
Introduced with Version 9.3. *Signature* WITHDB *Default* true *Summary* By default, URIs specified in the fn:doc <http://docs.basex.org/wiki/Databases#XML_Documents> and fn:collection <http://docs.basex.org/wiki/Databases#XML_Documents> functions will also be resolved against existing databases. If db:open <http://docs.basex.org/wiki/Database_Module#db:open> is consistently used to access database documents, it is recommendable to disable this option:
- Access to local and external resources will be faster, as the database lookup will be skipped. - No locks will be created by the two functions (see limitations of database locking <http://docs.basex.org/wiki/Transaction_Management#Limitations> for more details).
-- France Baril Architecte documentaire / Documentation architect france.baril@architextus.com