Object entry = context.getEntry(key);
if (!(entry instanceof DBDocument)) {
continue;
}
DBDocument d = (DBDocument) entry;
final Node n = d.getDocumentElement();
if (n == null) {
if (log.isInfoEnabled()) {
log.info("Document " + context.getCanonicalDocumentName(key) + " is empty, skipping.");
}
continue;
}
XPathContext xpc = new XPathContext();
PrefixResolver pfx;
if (pr == null) {
pfx = new PrefixResolverDefault(d.getDocumentElement());
xp = new XPath(query, null, pfx, XPath.SELECT, errors);
} else {
pfx = pr;
if (xp == null) {
xp = new XPath(query, null, pfx, XPath.SELECT, errors);