Class Name11Checker

  • All Implemented Interfaces:
    java.io.Serializable

    public final class Name11Checker
    extends NameChecker
    The class checks names against the rules of the XML 1.1 and XML Namespaces 1.1 specification
    See Also:
    Serialized Form
    • Constructor Detail

      • Name11Checker

        public Name11Checker()
    • Method Detail

      • getInstance

        public static Name11Checker getInstance()
        Get the singular instance of this class
        Returns:
        the singular instance of this class
      • isValidChar

        public boolean isValidChar​(int ch)
        Test whether a character is a valid XML character
        Specified by:
        isValidChar in class NameChecker
        Parameters:
        ch - the character to be tested
        Returns:
        true if this is a valid character in the selected version of XML
      • isNCNameChar

        public boolean isNCNameChar​(int ch)
        Test whether a character can appear in an NCName
        Specified by:
        isNCNameChar in class NameChecker
        Parameters:
        ch - the character to be tested
        Returns:
        true if this is a valid character in an NCName the selected version of XML
      • isNCNameStartChar

        public boolean isNCNameStartChar​(int ch)
        Test whether a character can appear at the start of an NCName
        Specified by:
        isNCNameStartChar in class NameChecker
        Parameters:
        ch - the character to be tested
        Returns:
        true if this is a valid character at the start of an NCName the selected version of XML
      • getXMLVersion

        public java.lang.String getXMLVersion()
        Return the XML version supported by this NameChecker
        Specified by:
        getXMLVersion in class NameChecker
        Returns:
        "1.1" as a string