context.declareVariable("collection", path.toString());
context.declareVariable("document", docName);
context.declareVariable("base", new IntegerValue(baseRev));
context.declareVariable("key", key);
if(compiled == null)
compiled = xquery.compile(context, GET_CONFLICTING_REV_SOURCE);
try {
Sequence s = xquery.execute(compiled, Sequence.EMPTY_SEQUENCE);
return !s.isEmpty();
} finally {
pool.returnCompiledXQuery(GET_CONFLICTING_REV_SOURCE, compiled);