Package org.exolab.castor.xml.validators
Class ValidationUtils
java.lang.Object
org.exolab.castor.xml.validators.ValidationUtils
A static class for performing simple validation.
- Version:
- $Revision$ $Date: 2003-03-03 00:05:44 -0700 (Mon, 03 Mar 2003) $
- Author:
- Keith Visco
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks all characters of the given String to determine if they syntactically match the production of a CDATA.static boolean
isCombiningChar
(char ch) Checks the given character to determine if it is a valid CombiningChar as defined by the W3C XML 1.0 Recommendation.static boolean
isDigit
(char ch) Checks a character to see if it is a digit or not.static boolean
isExtender
(char ch) Returns true if the given character is a valid XML Extender character, according to the XML 1.0 specification.static boolean
isLetter
(char ch) Checks a character to see if it is a letter or not.static boolean
Checks all characters of the given String to determine if they syntactically match the production of an NCName as defined by the W3C XML Namespaces recommendation.static boolean
isNCNameChar
(char ch) Checks the the given character to determine if it is a valid NCNameChar as defined by the W3C XML Namespaces recommendation.static boolean
Checks all characters of the given String to determine if they syntactically match the production of an NMToken.static boolean
Checks all characters of the given String to determine if they syntactically match the production of an QName as defined by the W3C XML Namespaces recommendation.
-
Method Details
-
isCombiningChar
public static boolean isCombiningChar(char ch) Checks the given character to determine if it is a valid CombiningChar as defined by the W3C XML 1.0 Recommendation.FIXME: This method needs to be properly implemented.
- Parameters:
ch
- THe character to check.- Returns:
- true if the given character is a CombiningChar
-
isDigit
public static boolean isDigit(char ch) Checks a character to see if it is a digit or not.- Parameters:
ch
- the character to check- Returns:
- true if the given character is a digit
-
isLetter
public static boolean isLetter(char ch) Checks a character to see if it is a letter or not.- Parameters:
ch
- the character to check- Returns:
- true if the given character is a letter
-
isNCName
Checks all characters of the given String to determine if they syntactically match the production of an NCName as defined by the W3C XML Namespaces recommendation.- Parameters:
str
- the String to check- Returns:
- true if the given String follows the Syntax of an NCName
-
isNCNameChar
public static boolean isNCNameChar(char ch) Checks the the given character to determine if it is a valid NCNameChar as defined by the W3C XML Namespaces recommendation.- Parameters:
ch
- the char to check- Returns:
- true if the given char is an NCNameChar
-
isNMToken
Checks all characters of the given String to determine if they syntactically match the production of an NMToken.- Parameters:
str
- the String to check- Returns:
- true if the given String follows the Syntax of an NMToken
-
isCDATA
Checks all characters of the given String to determine if they syntactically match the production of a CDATA.- Parameters:
str
- the String to check- Returns:
- true if the given String follows the Syntax of an NMToken
-
isExtender
public static boolean isExtender(char ch) Returns true if the given character is a valid XML Extender character, according to the XML 1.0 specification.- Parameters:
ch
- the character to check- Returns:
- true if the character is a valid XML Extender character
-
isQName
Checks all characters of the given String to determine if they syntactically match the production of an QName as defined by the W3C XML Namespaces recommendation.- Parameters:
str
- the String to check- Returns:
- true if the given String follows the Syntax of an QName
-