String module = env.getSystemId();
lineInfo += (module == null ? "" : "of " + module + ' ');
String prefix = getLanguage() + " syntax error " + lineInfo +
(message.startsWith("...") ? "near" : "in") +
" `" + s + "`:\n ";
XPathException exception = new StaticError(prefix + message);
try {
env.getConfiguration().getErrorListener().error(exception);
} catch (TransformerException err) {
if (err instanceof StaticError) {
throw (StaticError) err;