net.sf.saxon.om
Class Name10Checker

java.lang.Object
  extended by net.sf.saxon.om.NameChecker
      extended by net.sf.saxon.om.Name10Checker

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


Field Summary
static Name10Checker theInstance
           
 
Constructor Summary
Name10Checker()
           
 
Method Summary
static Name10Checker getInstance()
           
 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(CharSequence name)
          Validate whether a given string constitutes a valid NCName, as defined in XML Namespaces.
 
Methods inherited from class net.sf.saxon.om.NameChecker
checkQNameParts, getPrefix, getQNameParts, isQName
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theInstance

public static final Name10Checker theInstance
Constructor Detail

Name10Checker

public Name10Checker()
Method Detail

getInstance

public static final Name10Checker getInstance()

isValidNCName

public boolean isValidNCName(CharSequence 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 String getXMLVersion()
Return the XML version supported by this NameChecker

Specified by:
getXMLVersion in class NameChecker
Returns:
"1.0" as a string


Copyright (C) Michael H. Kay. All rights reserved.