public static boolean isValidNmtoken(String nmtoken){
  if (nmtoken.length() == 0)   return false;
  for (int i=0; i < nmtoken.length(); i++) {
    char ch=nmtoken.charAt(i);
    if (!isName(ch)) {
      return false;
    }
  }
  return true;
}

public static boolean isValidNmtoken ( String nmtoken ) { if ( nmtoken . length ( ) == 0 ) return false ; for ( int i = 0 ; i < nmtoken . length ( ) ; i ++ ) { char ch = nmtoken . charAt ( i ) ; if ( ! isName ( ch ) ) { return false ; } } return true ; }
check to see if a string is a valid nmtoken according to [ 7 ] in the xml 1 . 0 recommendation
