throws XPathException {
final Sequence docsArg = getArgument(0).eval(contextSequence, contextItem);
final DocumentSet docs = docsArg.getDocumentSet();
try {
docs.lock(context.getBroker(), exclusive, false);
return getArgument(1).eval(contextSequence, contextItem);
} catch (final LockException e) {
throw new XPathException(this, "Could not lock document set", e);
} finally {
docs.unlock(exclusive);