final StringBuilder pBuilder = new StringBuilder();
if (nsp != null) {
String prefix = nsp.getText();
if (!definedNamespaces.containsKey(prefix.substring(0, prefix.length() - 1))) {
addError(new NamespaceUndefinedException(nsp.getLine(), nsp.getCharPositionInLine()));
}
pBuilder.append(prefix);
}