com.thaiopensource.relaxng.impl
Class IdSoundnessChecker
java.lang.Object
com.thaiopensource.relaxng.impl.IdSoundnessChecker
- All Implemented Interfaces:
- Validator, ContentHandler
- Direct Known Subclasses:
- FeasibleIdSoundnessChecker
public class IdSoundnessChecker
- extends Object
- implements Validator, ContentHandler
Method Summary |
void |
characters(char[] chars,
int i,
int i1)
|
void |
endDocument()
|
void |
endElement(String s,
String s1,
String s2)
|
void |
endPrefixMapping(String s)
|
private void |
error(String key)
|
private void |
error(String key,
String arg)
|
private void |
error(String key,
String arg,
Locator loc)
|
ContentHandler |
getContentHandler()
Returns the ContentHandler that will receive the XML document. |
DTDHandler |
getDTDHandler()
Returns a DTDHandler. |
private void |
id(String token)
|
private void |
idref(String token)
|
void |
ignorableWhitespace(char[] chars,
int i,
int i1)
|
void |
notationDecl(String name,
String publicId,
String systemId)
|
void |
processingInstruction(String s,
String s1)
|
void |
reset()
Cleans up after validating a document. |
(package private) void |
setComplete()
|
void |
setDocumentLocator(Locator locator)
|
void |
skippedEntity(String s)
|
void |
startDocument()
|
void |
startElement(String namespaceUri,
String localName,
String qName,
Attributes attributes)
|
void |
startPrefixMapping(String s,
String s1)
|
void |
unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
idTypeMap
private final IdTypeMap idTypeMap
eh
private final ErrorHandler eh
locator
private Locator locator
table
private final Hashtable table
IdSoundnessChecker
public IdSoundnessChecker(IdTypeMap idTypeMap,
ErrorHandler eh)
reset
public void reset()
- Description copied from interface:
Validator
- Cleans up after validating a document. After completing validation
of a document,
reset
must be called. After calling
reset(), another document may be validated. Calling this method
may create new ContentHandler and DTDHandler objects or may simply
reinitialize the state of the existing objects.
- Specified by:
reset
in interface Validator
getContentHandler
public ContentHandler getContentHandler()
- Description copied from interface:
Validator
- Returns the ContentHandler that will receive the XML document.
Information about the XML document to be validated must be
reported by calling methods on the returned ContentHandler.
When validation of an XML document has been completed (either
endDocument() has been called or validation has been abandoned
prematurely), reset() must be called. If no calls are made
on the ContentHandler, then reset() need not be called.
Implementations should allocate resources that require
cleanup (e.g. threads, open files) lazily, typically
in startDocument().
This method does not change the state of the Validator: the same
object will always be returned unless
reset
is called.
- Specified by:
getContentHandler
in interface Validator
- Returns:
- a ContentHandler, never
null
- See Also:
Validator.reset()
getDTDHandler
public DTDHandler getDTDHandler()
- Description copied from interface:
Validator
- Returns a DTDHandler. Information about the DTD must be reported
by calling methods on the returned object, unless
null
is returned. The same object will always be returned unless
reset
is called: this method does not change the state
of the Validator.
- Specified by:
getDTDHandler
in interface Validator
- Returns:
- a DTDHandler, maybe
null
if DTD information is
not significant to the Validator
setDocumentLocator
public void setDocumentLocator(Locator locator)
- Specified by:
setDocumentLocator
in interface ContentHandler
startDocument
public void startDocument()
throws SAXException
- Specified by:
startDocument
in interface ContentHandler
- Throws:
SAXException
setComplete
void setComplete()
endDocument
public void endDocument()
throws SAXException
- Specified by:
endDocument
in interface ContentHandler
- Throws:
SAXException
startPrefixMapping
public void startPrefixMapping(String s,
String s1)
throws SAXException
- Specified by:
startPrefixMapping
in interface ContentHandler
- Throws:
SAXException
endPrefixMapping
public void endPrefixMapping(String s)
throws SAXException
- Specified by:
endPrefixMapping
in interface ContentHandler
- Throws:
SAXException
startElement
public void startElement(String namespaceUri,
String localName,
String qName,
Attributes attributes)
throws SAXException
- Specified by:
startElement
in interface ContentHandler
- Throws:
SAXException
id
private void id(String token)
throws SAXException
- Throws:
SAXException
idref
private void idref(String token)
endElement
public void endElement(String s,
String s1,
String s2)
throws SAXException
- Specified by:
endElement
in interface ContentHandler
- Throws:
SAXException
characters
public void characters(char[] chars,
int i,
int i1)
throws SAXException
- Specified by:
characters
in interface ContentHandler
- Throws:
SAXException
ignorableWhitespace
public void ignorableWhitespace(char[] chars,
int i,
int i1)
throws SAXException
- Specified by:
ignorableWhitespace
in interface ContentHandler
- Throws:
SAXException
processingInstruction
public void processingInstruction(String s,
String s1)
throws SAXException
- Specified by:
processingInstruction
in interface ContentHandler
- Throws:
SAXException
skippedEntity
public void skippedEntity(String s)
throws SAXException
- Specified by:
skippedEntity
in interface ContentHandler
- Throws:
SAXException
notationDecl
public void notationDecl(String name,
String publicId,
String systemId)
throws SAXException
- Throws:
SAXException
unparsedEntityDecl
public void unparsedEntityDecl(String name,
String publicId,
String systemId,
String notationName)
throws SAXException
- Throws:
SAXException
error
private void error(String key)
throws SAXException
- Throws:
SAXException
error
private void error(String key,
String arg)
throws SAXException
- Throws:
SAXException
error
private void error(String key,
String arg,
Locator loc)
throws SAXException
- Throws:
SAXException