try {
xpathProcessor = (XPathProcessor)manager.lookup(XPathProcessor.ROLE);
} catch (Exception e) {
throw new SAXException("XPointerPart: error looking up XPathProcessor.", e);
}
NodeList nodeList = xpathProcessor.selectNodeList(document, expression, xpointerContext);
if (nodeList.getLength() > 0) {
XMLConsumer consumer = xpointerContext.getXmlConsumer();
LocatorImpl locator = new LocatorImpl();
locator.setSystemId(xpointerContext.getSource().getURI());
consumer.setDocumentLocator(locator);