if (localName == null) {
throw createDOMException(DOMException.NOT_FOUND_ERR,
"attribute.missing",
new Object[] { "" });
}
AbstractAttr n = (AbstractAttr)remove(namespaceURI, localName);
if (n == null) {
throw createDOMException(DOMException.NOT_FOUND_ERR,
"attribute.missing",
new Object[] { localName });
}
n.setOwnerElement(null);
String prefix = n.getPrefix();
// Reset the attribute to its default value
if (!resetAttribute(namespaceURI, prefix, localName)) {
// Mutation event
fireDOMAttrModifiedEvent(n.getNodeName(), n.getNodeValue(), "");
}
return n;
}