@Override public Attr createAttribute(String name) throws DOMException {
  if (errorChecking && !isXMLName(name,xml11Version)) {
    String msg=DOMMessageFormatter.formatMessage(DOMMessageFormatter.DOM_DOMAIN,"INVALID_CHARACTER_ERR",null);
    throw new DOMException(DOMException.INVALID_CHARACTER_ERR,msg);
  }
  return new AttrImpl(this,name);
}

@ Override public Attr createAttribute ( String name ) throws DOMException { if ( errorChecking && ! isXMLName ( name , xml11Version ) ) { String msg = DOMMessageFormatter . formatMessage ( DOMMessageFormatter . DOM_DOMAIN , "INVALID_CHARACTER_ERR" , null ) ; throw new DOMException ( DOMException . INVALID_CHARACTER_ERR , msg ) ; } return new AttrImpl ( this , name ) ; }
factory method ; creates an attribute having this document as its ownerdoc .
