public static boolean isValidNCName(CharSequence ncName) {
int len = ncName.length();
if (len==0) {
return false;
}
UnicodeString us = GeneralUnicodeString.makeUnicodeString(ncName);
if (!isNCNameStartChar(us.charAt(0))) {
return false;
}
for (int i=1; i<len; i++) {
if (!isNCNameChar(us.charAt(i))) {
return false;
}
}
return true;
}