private class StaxErrorReporter implements XMLReporter {
public void report(String message, String errorType,
Object relatedInformation, Location location)
throws XMLStreamException {
ExpressionLocation loc = translateLocation(location);
XPathException err = new XPathException("Error reported by XML parser: " + message + " (" + errorType + ')');
err.setLocator(loc);
try {
pipe.getErrorListener().error(err);
} catch (TransformerException e) {