net.sf.saxon.om
Class Name10Checker

java.lang.Object
  extended by net.sf.saxon.om.NameChecker
      extended by net.sf.saxon.om.Name10Checker
All Implemented Interfaces:
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
static Name10Checker theInstance
           
 
Constructor Summary
Name10Checker()
           
 
Method Summary
static Name10Checker getInstance()
          Get the singular instance of this class
 String getXMLVersion()
          Return the XML version supported by this NameChecker
 boolean isNCNameChar(int ch)
          Test whether a character can appear in an NCName
 boolean isNCNameStartChar(int ch)
          Test whether a character can appear at the start of an NCName
 boolean isValidChar(int ch)
          Test whether a character is a valid XML character
static void main(String[] args)
           
 
Methods inherited from class net.sf.saxon.om.NameChecker
checkQNameParts, firstInvalidChar, getPrefix, getQNameParts, isQName, isValidNCName, isValidNmtoken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, 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 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:
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

isNCNameChar

public boolean isNCNameChar(int ch)
Test whether a character can appear in an NCName

Specified by:
isNCNameChar in class NameChecker
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:
isNCNameStartChar in class NameChecker
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 String getXMLVersion()
Return the XML version supported by this NameChecker

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

main

public static void main(String[] args)


Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.