if(cached == null || cached.loadTimeStamp < lastModified) {
if(cached == null) {
cached = new CachedQuery();
}
// parse XQuery expression
XQueryParser parser = new XQueryParser(is);
StaticContext staticEnv = parser.getStaticContext();
try {
URI baseUri = url.toURI();
staticEnv.setBaseURI(baseUri);
} catch (URISyntaxException e) {
log(PrintUtils.prettyPrintStackTrace(e, -1));
}
final XQueryModule module;
try {
module = parser.parse();
} catch (XQueryException e) {
log(PrintUtils.prettyPrintStackTrace(e, -1));
_lock.readLock().unlock();
throw e;
}