if (nr != null) {
String prefix = nr.resolveNamespaceURI(attributeName.getNamespaceURI());
if ((prefix != null) && !prefix.equals("")) {
qualifiedName = prefix + ":" + qualifiedName;
} else if (attributeName.getNamespaceURI() != null && !attributeName.getNamespaceURI().equals("")) {
String generatedPrefix = nr.generatePrefix();
qualifiedName = generatedPrefix + ":" + qualifiedName;
nr.put(generatedPrefix, attributeName.getNamespaceURI());
extraNamespaces.add(new Namespace(generatedPrefix, attributeName.getNamespaceURI()));
row.getNamespaceResolver().put(generatedPrefix, attributeName.getNamespaceURI());
}