} catch (SourceException se) {
throw new ProcessingException("Error during resolving of '" + this.source + "'.", se);
}
// setup a Locator in case parser detects input errors
final LocatorImpl locator = new LocatorImpl();
locator.setSystemId(this.inputSource.getURI());
locator.setLineNumber(1);
locator.setColumnNumber(1);
contentHandler.setDocumentLocator(locator);
// start parsing, read and process all input lines
parser.startDocument(contentHandler);
LineNumberReader reader = new LineNumberReader(in);
String line, newline = null;
while (true) {
if (newline == null) {
line = reader.readLine();
} else {
line = newline;
}
if (line == null) {
break;
}
newline = reader.readLine();
locator.setLineNumber(reader.getLineNumber());
locator.setColumnNumber(1);
parser.processLine(line);
if (newline == null) {
break;
}