Package net.sf.saxon.om
Class Name10Checker
- java.lang.Object
-
- net.sf.saxon.om.NameChecker
-
- net.sf.saxon.om.Name10Checker
-
- All Implemented Interfaces:
java.io.Serializable
public final class Name10Checker extends NameChecker
The class checks names and characters against the rules of the XML 1.0 and XML Namespaces 1.0 specification- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static Name10CheckertheInstance
-
Constructor Summary
Constructors Constructor Description Name10Checker()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Name10CheckergetInstance()Get the singular instance of this classjava.lang.StringgetXMLVersion()Return the XML version supported by this NameCheckerbooleanisNCNameChar(int ch)Test whether a character can appear in an NCNamebooleanisNCNameStartChar(int ch)Test whether a character can appear at the start of an NCNamebooleanisValidChar(int ch)Test whether a character is a valid XML characterstatic voidmain(java.lang.String[] args)-
Methods inherited from class net.sf.saxon.om.NameChecker
checkQNameParts, firstInvalidChar, getPrefix, getQNameParts, isQName, isValidNCName, isValidNmtoken
-
-
-
-
Field Detail
-
theInstance
public static final Name10Checker theInstance
-
-
Method Detail
-
getInstance
public static Name10Checker 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:
isValidCharin classNameChecker- 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:
isNCNameCharin classNameChecker- Parameters:
ch- the character to be tested- Returns:
- true if this is a valid character in an NCName. The rules for XML 1.0 fifth edition are the same as the XML 1.1 rules, and these are the rules that we use.
-
isNCNameStartChar
public boolean isNCNameStartChar(int ch)
Test whether a character can appear at the start of an NCName- Specified by:
isNCNameStartCharin classNameChecker- Parameters:
ch- the character to be tested- Returns:
- true if this is a valid character at the start of an NCName. The rules for XML 1.0 fifth edition are the same as the XML 1.1 rules, and these are the rules that we use.
-
getXMLVersion
public java.lang.String getXMLVersion()
Return the XML version supported by this NameChecker- Specified by:
getXMLVersionin classNameChecker- Returns:
- "1.0" as a string
-
main
public static void main(java.lang.String[] args)
-
-