public Attr getAttributeNodeNS(String namespaceURI, String localName) {
if (OMConstants.XMLNS_NS_URI.equals(namespaceURI)) {
OMNamespace ns = this.findNamespaceURI(localName);
String nsuri = ns != null ? ns.getNamespaceURI() : "";
AttrImpl namespaceAttr = new AttrImpl(this.ownerNode,
localName, nsuri, this.factory);
NamespaceImpl xmlNs = new NamespaceImpl(OMConstants.XMLNS_NS_URI);
namespaceAttr.setOMNamespace(xmlNs);
return namespaceAttr;
}
return (this.attributes == null) ? null : (Attr) this.attributes
.getNamedItemNS(namespaceURI, localName);
}