/** * validate the value against the xsd definition Nmtoken ::= (NameChar)+ NameChar ::= * Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender */ public static boolean isValid(String stValue) { int scan; for (scan = 0; scan < stValue.length(); scan++) { if (!XMLChar.isName(stValue.charAt(scan))) return false; } return true; } }
/** * validate the value against the xsd definition Name ::= (Letter | '_' | ':') ( * NameChar)* NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | * Extender */ //todo - Fix this public static boolean isValid(String stValue) { int scan; boolean bValid = true; for (scan = 0; scan < stValue.length(); scan++) { if (scan == 0) { bValid = XMLChar.isNameStart(stValue.charAt(scan)); } else { bValid = XMLChar.isName(stValue.charAt(scan)); } if (!bValid) break; } return bValid; } }
/** * validate the value against the xsd definition Name ::= (Letter | '_' | ':') ( * NameChar)* NameChar ::= Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | * Extender */ //todo - Fix this public static boolean isValid(String stValue) { int scan; boolean bValid = true; for (scan = 0; scan < stValue.length(); scan++) { if (scan == 0) { bValid = XMLChar.isNameStart(stValue.charAt(scan)); } else { bValid = XMLChar.isName(stValue.charAt(scan)); } if (!bValid) break; } return bValid; } }
/** * validate the value against the xsd definition Nmtoken ::= (NameChar)+ NameChar ::= * Letter | Digit | '.' | '-' | '_' | ':' | CombiningChar | Extender */ public static boolean isValid(String stValue) { int scan; for (scan = 0; scan < stValue.length(); scan++) { if (!XMLChar.isName(stValue.charAt(scan))) return false; } return true; } }
/** * Check to see if a string is a valid Name according to [5] * in the XML 1.0 Recommendation * * @param name string to check * @return true if name is a valid Name */ public static boolean isValidName(String name) { if (name.length() == 0) { return false; } char ch = name.charAt(0); if (!isNameStart(ch)) { return false; } for (int i = 1; i < name.length(); i++) { ch = name.charAt(i); if (!isName(ch)) { return false; } } return true; } // isValidName(String):boolean
/** * Check to see if a string is a valid Nmtoken according to [7] * in the XML 1.0 Recommendation * * @param nmtoken string to check * @return true if nmtoken is a valid Nmtoken */ 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; } // isValidName(String):boolean
/** * Check to see if a string is a valid Name according to [5] * in the XML 1.0 Recommendation * * @param name string to check * @return true if name is a valid Name */ public static boolean isValidName(String name) { if (name.length() == 0) { return false; } char ch = name.charAt(0); if (!isNameStart(ch)) { return false; } for (int i = 1; i < name.length(); i++) { ch = name.charAt(i); if (!isName(ch)) { return false; } } return true; } // isValidName(String):boolean
/** * Check to see if a string is a valid Nmtoken according to [7] * in the XML 1.0 Recommendation * * @param nmtoken string to check * @return true if nmtoken is a valid Nmtoken */ 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; } // isValidName(String):boolean