try {
dtm.loadDocument(is, dynEnv);
} catch (XQueryException e) {
throw new DynamicError("loading a document failed: " + unescaped, e);
}
xqdoc = dtm.documentNode();
xqdoc.setDocumentUri(unescaped);
_sharedCache.put(docurl, xqdoc);
}
// import namespace decl
Map<String, String> nsmap = xqdoc.documentTable().getDeclaredNamespaces();