/** * Adds a new attribute. * * @param object Attr * @return object Attr * @access public */ function &setAttributeNodeNS(&$newAttr) { if (!Attr::isInherited($newAttr)) { return $this->raiseError(HIERARCHY_REQUEST_ERR); } if ($this->ownerDocument->_ID != $newAttr->ownerDocument->_ID) { return $this->raiseError(WRONG_DOCUMENT_ERR); } if ($newAttr->ownerElement != null) { return $this->raiseError(INUSE_ATTRIBUTE_ERR); } $newAttr->ownerElement =& $this; return $this->attributes->setNamedItemNS(&$newAttr); }