# File lib/xml/dom2/element.rb, line 452 def setAttributeNS(nsuri, qname, value) if qname.index(':') prefix, localname = qname.split(':') raise DOMException.new(DOMException::NAMESPACE_ERR) if nsuri.nil? or (prefix == 'xml' and nsuri != 'http://www.w3.org/XML/1998/namespace') else raise DOMException.new(DOMException::NAMESPACE_ERR) if qname == 'xmlns' and nsuri != 'http://www.w3.org/2000/xmlns/' end attr = @ownerDocument.createAttributeNS(nsuri, qname) attr.appendChild(@ownerDocument.createTextNode(value)) setAttributeNodeNS(attr) end