xmldb:document-has-lock($collection-uri as xs:string, $resource as xs:string) xs:string?
Returns the user-id of the user that holds a write lock on the resource $resource in the collection $collection-uri. If no lock is in place, the empty sequence is returned. Collection URIs can be specified either as a simple collection path or an XMLDB URI.
$collection-uri
The collection URI
$resource
The resource
Returns the user id of the lock owner, otherwise if not locked the empty sequence