Package net.sf.saxon.om
Class Name10Checker
java.lang.Object
net.sf.saxon.om.NameChecker
net.sf.saxon.om.Name10Checker
The class checks names and characters
against the rules of the XML 1.0 and XML Namespaces 1.0 specification
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final Name10Checker
Return the XML version supported by this NameCheckerboolean
isValidChar
(int ch) Test whether a character is a valid XML characterboolean
isValidNCName
(String name) Validate whether a given string constitutes a valid NCName, as defined in XML Namespaces.Methods inherited from class net.sf.saxon.om.NameChecker
getPrefix, getQNameParts, isQName
-
Field Details
-
theInstance
-
-
Constructor Details
-
Name10Checker
public Name10Checker()
-
-
Method Details
-
getInstance
-
isValidNCName
Validate whether a given string constitutes a valid NCName, as defined in XML Namespaces.- Specified by:
isValidNCName
in classNameChecker
- 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 classNameChecker
- Parameters:
ch
- the character to be tested- Returns:
- true if this is a valid character in the selected version of XML
-
getXMLVersion
Return the XML version supported by this NameChecker- Specified by:
getXMLVersion
in classNameChecker
- Returns:
- "1.0" as a string
-