throw new DomEx(DomEx.NAMESPACE_ERR,
throw new DomDOMException(DOMException.NAMESPACE_ERR,
  public Attr createAttributeNS(String namespaceURI, String name)  {    if (checkingCharacters)      {        checkNCName(name, "1.1".equals(version));      }        if ("".equals(namespaceURI))      {        namespaceURI = null;      }    if (name.startsWith ("xml:"))      {        if (namespaceURI == null)          {            namespaceURI = XMLConstants.XML_NS_URI;          }        else if (!XMLConstants.XML_NS_URI.equals(namespaceURI))          {            throw new DomEx(DomEx.NAMESPACE_ERR,                            "xml namespace is always " +                            XMLConstants.XML_NS_URI, this, 0);          }      }    else if (XMLConstants.XMLNS_ATTRIBUTE.equals(name) ||             name.startsWith("xmlns:"))      {        if (namespaceURI == null)          {            namespaceURI = XMLConstants.XMLNS_ATTRIBUTE_NS_URI;          }        else if (!XMLConstants.XMLNS_ATTRIBUTE_NS_URI.equals(namespaceURI))          {            throw new DomEx(DomEx.NAMESPACE_ERR,                            "xmlns namespace must be " +                            XMLConstants.XMLNS_ATTRIBUTE_NS_URI, this, 0);          }      }    else if (namespaceURI == null && name.indexOf(':') != -1)      {        throw new DomEx(DomEx.NAMESPACE_ERR,                        "prefixed name needs a URI: " + name, this, 0);      }    return new DomAttr(this, namespaceURI, name);  }