throw new DomEx (DomEx.NAMESPACE_ERR, name, null, 0);
throw new DomDOMException(DOMException.NAMESPACE_ERR, name, null, 0);
  static void checkName(String name, boolean xml11)  {    if (name == null)      {        throw new DomEx (DomEx.NAMESPACE_ERR, name, null, 0);      }    int len = name.length();    if (len == 0)      {        throw new DomEx (DomEx.NAMESPACE_ERR, name, null, 0);      }    // dog: rewritten to use the rules for XML 1.0 and 1.1        // Name start character    char c = name.charAt(0);    if (xml11)      {        // XML 1.1        if ((c < 0x0041 || c > 0x005a) &&            (c < 0x0061 || c > 0x007a) &&            c != ':' && c != '_' &&            (c < 0x00c0 || c > 0x00d6) &&            (c < 0x00d8 || c > 0x00f6) &&            (c < 0x00f8 || c > 0x02ff) &&            (c < 0x0370 || c > 0x037d) &&            (c < 0x037f || c > 0x1fff) &&            (c < 0x200c || c > 0x200d) &&            (c < 0x2070 || c > 0x218f) &&            (c < 0x2c00 || c > 0x2fef) &&            (c < 0x3001 || c > 0xd7ff) &&            (c < 0xf900 || c > 0xfdcf) &&            (c < 0xfdf0 || c > 0xfffd) &&            (c < 0x10000 || c > 0xeffff))          {            throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);          }      }    else      {        // XML 1.0        int type = Character.getType(c);        switch (type)          {          case Character.LOWERCASE_LETTER: // Ll          case Character.UPPERCASE_LETTER: // Lu          case Character.OTHER_LETTER: // Lo          case Character.TITLECASE_LETTER: // Lt          case Character.LETTER_NUMBER: // Nl            if ((c > 0xf900 && c < 0xfffe) ||                (c >= 0x20dd && c <= 0x20e0))              {                // Compatibility area and Unicode 2.0 exclusions                throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);              }            break;          default:            if (c != ':' && c != '_' && (c < 0x02bb || c > 0x02c1) &&                c != 0x0559 && c != 0x06e5 && c != 0x06e6)              {                throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);              }          }      }    // Subsequent characters    for (int i = 1; i < len; i++)      {        c = name.charAt(i);        if (xml11)          {            // XML 1.1            if ((c < 0x0041 || c > 0x005a) &&                (c < 0x0061 || c > 0x007a) &&                (c < 0x0030 || c > 0x0039) &&                c != ':' && c != '_' && c != '-' && c != '.' &&                (c < 0x00c0 || c > 0x00d6) &&                (c < 0x00d8 || c > 0x00f6) &&                (c < 0x00f8 || c > 0x02ff) &&                (c < 0x0370 || c > 0x037d) &&                (c < 0x037f || c > 0x1fff) &&                (c < 0x200c || c > 0x200d) &&                (c < 0x2070 || c > 0x218f) &&                (c < 0x2c00 || c > 0x2fef) &&                (c < 0x3001 || c > 0xd7ff) &&                (c < 0xf900 || c > 0xfdcf) &&                (c < 0xfdf0 || c > 0xfffd) &&                (c < 0x10000 || c > 0xeffff) &&                c != 0x00b7 &&                (c < 0x0300 || c > 0x036f) &&                (c < 0x203f || c > 0x2040))              {                throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);              }          }        else          {            // XML 1.0            int type = Character.getType(c);            switch (type)              {              case Character.LOWERCASE_LETTER: // Ll              case Character.UPPERCASE_LETTER: // Lu              case Character.DECIMAL_DIGIT_NUMBER: // Nd              case Character.OTHER_LETTER: // Lo              case Character.TITLECASE_LETTER: // Lt              case Character.LETTER_NUMBER: // Nl              case Character.COMBINING_SPACING_MARK: // Mc              case Character.ENCLOSING_MARK: // Me              case Character.NON_SPACING_MARK: // Mn              case Character.MODIFIER_LETTER: // Lm                if ((c > 0xf900 && c < 0xfffe) ||                    (c >= 0x20dd && c <= 0x20e0))                  {                    // Compatibility area and Unicode 2.0 exclusions                    throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);                  }                break;              default:                if (c != '-' && c != '.' && c != ':' && c != '_' &&                    c != 0x0387 && (c < 0x02bb || c > 0x02c1) &&                    c != 0x0559 && c != 0x06e5 && c != 0x06e6 && c != 0x00b7)                  {                    throw new DomEx(DomEx.INVALID_CHARACTER_ERR, name, null, c);                  }              }          }      }    // FIXME characters with a font or compatibility decomposition (i.e.    // those with a "compatibility formatting tag" in field 5 of the    // database -- marked by field 5 beginning with a "<") are not allowed.  }