net.sf.saxon.om
Class Name11Checker
java.lang.Object
net.sf.saxon.om.NameChecker
net.sf.saxon.om.Name11Checker
- public final class Name11Checker
- extends NameChecker
The class checks names against the rules of the XML 1.1 and XML Namespaces 1.1 specification
Method Summary |
static Name11Checker |
getInstance()
|
java.lang.String |
getXMLVersion()
Return the XML version supported by this NameChecker |
boolean |
isValidChar(int ch)
Test whether a character is a valid XML character |
boolean |
isValidNCName(java.lang.String name)
Validate whether a given string constitutes a valid NCName, as defined in XML Namespaces. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
theInstance
public static final Name11Checker theInstance
Name11Checker
public Name11Checker()
getInstance
public static final Name11Checker getInstance()
isValidNCName
public boolean isValidNCName(java.lang.String name)
- Validate whether a given string constitutes a valid NCName, as defined in XML Namespaces.
- Specified by:
isValidNCName
in class NameChecker
- Parameters:
name
- the name to be tested
- Returns:
- true if the name is a lexically-valid NCName
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
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