/** * The behaviour of this is the same as org.w3c.dom.Element#setAttributeNS * * @see org.apache.axiom.om.OMElement#addAttribute(String, String, org.apache.axiom.om.OMNamespace) */ public OMAttribute addAttribute(String attributeName, String value, OMNamespace ns) { if (ns != null && findNamespace(ns.getNamespaceURI(), ns.getPrefix()) != null) { declareNamespace(ns); } if (ns != null) { return this.addAttribute(ns.getNamespaceURI(), ns.getPrefix() + ":" + attributeName, value); } else { return this.addAttribute(null, attributeName, value); } }