Hi Jan (cc to the list), > why is doc("users.xml") not working although the database has been > opened before? It says "resource 'home/jan/..../users.xml not found'.. > > doc("main/users.xml") is working.
See the following lines in our documentation: If the argument of fn:doc or fn:collection does not start with a valid database name, or if the addressed database does not exist, the string is interpreted as URI reference, and the documents found at this location will be returned. If the DEFAULTDB option is turned on, the path argument of the fn:doc or fn:collection function will first be resolved against the globally opened database. Hope this helps, Christian