code: public static boolean isQName(CharSequence s) {
          if (isNullOrEmpty(s)) {
              return false;
          }
          boolean foundColon = false;
          boolean inNCName = false;
          for (int i = 0; i < s.length();) {
              int codePoint = Character.codePointAt(s, i);
              if (codePoint == ':') {
                  if (foundColon) {
                      return false;
                  }
                  foundColon = true;
                  if (!inNCName) {
                      return false;
                  }
                  inNCName = false;
              } else {
                  if (!inNCName) {
                      if (!isXMLNameStartCharacter(codePoint)) {
                          return false;
                      }
                      inNCName = true;
                  } else {
                      if (!isXMLNameChar(codePoint)) {
                          return false;
                      }
                  }
              }
              i += Character.charCount(codePoint);
          }
          return true;
      }
docs: Determines if a character sequence is a QName. A QName is either an
  NCName (LocalName), or an NCName followed by a colon followed by another
  NCName (where the first NCName is referred to as the 'Prefix Name' and
  the second NCName is referred to as the 'Local Name' - i.e.
  PrefixName:LocalName).
  
  @param s
  The character sequence to be tested.
  @return {@code true} if {@code s} is a QName, otherwise {@code false}.