net.sf.saxon.om

Class 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
Field Summary
static Name11CheckertheInstance
Method Summary
static Name11CheckergetInstance()
StringgetXMLVersion()
Return the XML version supported by this NameChecker
booleanisValidChar(int ch)
Test whether a character is a valid XML character
booleanisValidNCName(String name)
Validate whether a given string constitutes a valid NCName, as defined in XML Namespaces.

Field Detail

theInstance

public static final Name11Checker theInstance

Method Detail

getInstance

public static final Name11Checker getInstance()

getXMLVersion

public String getXMLVersion()
Return the XML version supported by this NameChecker

Returns: "1.1" as a string

isValidChar

public boolean isValidChar(int ch)
Test whether a character is a valid XML character

Parameters: ch the character to be tested

Returns: true if this is a valid character in the selected version of XML

isValidNCName

public boolean isValidNCName(String name)
Validate whether a given string constitutes a valid NCName, as defined in XML Namespaces.

Parameters: name the name to be tested

Returns: true if the name is a lexically-valid NCName