code: protected boolean isXMLName(String s, boolean xml11Version) {
  
          if (s == null) {
              return false;
          }
          if (!xml11Version)
              return XMLChar.isValidName(s);
          else
              return XML11Char.isXML11ValidName(s);
      }
docs: Taken from org.apache.xerces.dom.CoreDocumentImpl
  
  Check the string against XML's definition of acceptable names for
  elements and attributes and so on using the XMLCharacterProperties
  utility class