if(compiled == null)
{compiled = xquery.compile(context, source);}
try {
result = xquery.execute(compiled, null, properties);
} finally {
pool.returnCompiledXQuery(source, compiled);
}
} catch (final EXistException e) {
throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(), e);
} catch (final XPathException e) {
throw new XMLDBException(ErrorCodes.VENDOR_ERROR, e.getMessage(), e);