|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.saxon.om.NameChecker
public abstract class NameChecker
A NameChecker performs validation and analysis of XML names. There are two implementations of this interface, one for XML 1.0 names and one for XML 1.1 names. The class also handles validation of characters against the XML 1.0 or XML 1.1 rules.
Constructor Summary | |
---|---|
NameChecker()
|
Method Summary | |
---|---|
String[] |
checkQNameParts(CharSequence qname)
Validate a QName, and return the prefix and local name. |
static String |
getPrefix(String qname)
Extract the prefix from a QName. |
String[] |
getQNameParts(CharSequence qname)
Validate a QName, and return the prefix and local name. |
abstract String |
getXMLVersion()
Return the XML version supported by this NameChecker |
boolean |
isQName(String name)
Validate whether a given string constitutes a valid QName, as defined in XML Namespaces. |
abstract boolean |
isValidChar(int ch)
Test whether a character is a valid XML character |
abstract boolean |
isValidNCName(CharSequence name)
Validate whether a given string constitutes a valid NCName, as defined in XML Namespaces. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public NameChecker()
Method Detail |
---|
public final boolean isQName(String name)
name
- the name to be tested
public abstract boolean isValidNCName(CharSequence name)
name
- the name to be tested
public static final String getPrefix(String qname)
qname
- The lexical QName whose prefix is required
public final String[] getQNameParts(CharSequence qname) throws QNameException
qname
- the lexical QName whose parts are required. Note that leading and trailing
whitespace is not permitted
QNameException
- if not a valid QName.public final String[] checkQNameParts(CharSequence qname) throws XPathException
Used from compiled code
qname
- the lexical QName whose parts are required. Note that leading and trailing
whitespace is not permitted
XPathException
- if not a valid QName.public abstract boolean isValidChar(int ch)
ch
- the character to be tested
public abstract String getXMLVersion()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |