|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
XMLValidator defines the interface that XMLDocumentScanner and XML EntityHandler have with an object that serves as a pluggable validator. This abstraction allows validators for XML grammar languages to be plugged in and queried for validity checks as the scanner processes a document.
The document scanner and entity handler need to ask the validator object for this information because the validator object is responsible for reading the grammar specification file (which contains markup declarations and entity declarations)
Nested Class Summary | |
static interface |
XMLDocumentHandler.DTDHandler
|
Method Summary | |
void |
characters(char[] ch,
int start,
int length)
callback for characters. |
void |
characters(int data)
callback for characters (string pool form). |
void |
comment(int comment)
callback for comment. |
void |
endCDATA()
callback for end of CDATA section. |
void |
endDocument()
callback for the end of document. |
void |
endElement(QName element)
callback for end of element. |
void |
endEntityReference(int entityName,
int entityType,
int entityContext)
callback for end of entity reference. |
void |
endNamespaceDeclScope(int prefix)
callback for the end a namespace declaration scope. |
void |
ignorableWhitespace(char[] ch,
int start,
int length)
callback for ignorable whitespace. |
void |
ignorableWhitespace(int data)
callback for ignorable whitespace. |
void |
processingInstruction(int target,
int data)
callback for processing instruction. |
void |
startCDATA()
callback for start of CDATA section. |
void |
startDocument()
Callback for start of document If the there is no version info, encoding info, or standalone info, the corresponding argument will be set to -1. |
void |
startElement(QName element,
XMLAttrList attrList,
int attrListHandle)
callback for the start of element. |
void |
startEntityReference(int entityName,
int entityType,
int entityContext)
callback for start of entity reference. |
void |
startNamespaceDeclScope(int prefix,
int uri)
callback for the start of a namespace declaration scope. |
void |
textDecl(int version,
int encoding)
Signal the Text declaration of an external entity. |
void |
xmlDecl(int version,
int encoding,
int standalone)
Signal the XML declaration of a document |
Method Detail |
public void startDocument() throws Exception
Exception
public void endDocument() throws Exception
Exception
public void xmlDecl(int version, int encoding, int standalone) throws Exception
version
- the handle in the string pool for the version numberencoding
- the handle in the string pool for the encoding
Exception
public void textDecl(int version, int encoding) throws Exception
Exception
public void startNamespaceDeclScope(int prefix, int uri) throws Exception
prefix
- string pool index of the namespace prefix being declareduri
- string pool index of the namespace uri begin bound
Exception
public void endNamespaceDeclScope(int prefix) throws Exception
prefix
- string pool index of the namespace prefix being declared
Exception
public void startElement(QName element, XMLAttrList attrList, int attrListHandle) throws Exception
attrList
- attrList containing the attributes of the elementattrListHandle
- handle into attrList. Allows attributes to be retreived.
Exception
public void endElement(QName element) throws Exception
Exception
public void startEntityReference(int entityName, int entityType, int entityContext) throws Exception
entityName
- string pool index of the entity nameentityType
- the XMLEntityHandler.ENTITYTYPE_* typeentityContext
- the XMLEntityHandler.ENTITYREF_* type for where
the entity reference appears
Exception
XMLEntityHandler
,
XMLEntityHandler
public void endEntityReference(int entityName, int entityType, int entityContext) throws Exception
entityName
- string pool index of the entity anementityType
- the XMLEntityHandler.ENTITYTYPE_* typeentityContext
- the XMLEntityHandler.ENTITYREF_* type for where
the entity reference appears
Exception
XMLEntityHandler
,
XMLEntityHandler
public void processingInstruction(int target, int data) throws Exception
target
- string pool index of the PI targetdata
- string pool index of the PI data
Exception
public void comment(int comment) throws Exception
comment
- string pool index of the comment text
Exception
public void characters(int data) throws Exception
data
- string pool index of the characters that were scanned
Exception
public void characters(char[] ch, int start, int length) throws Exception
ch
- character array containing the characters that were scannedstart
- offset in ch where scanned characters beginlength
- length of scanned characters in ch
Exception
public void ignorableWhitespace(int data) throws Exception
data
- string pool index of ignorable whitespace
Exception
public void ignorableWhitespace(char[] ch, int start, int length) throws Exception
ch
- character array containing the whitespace that was scannedstart
- offset in ch where scanned whitespace beginslength
- length of scanned whitespace in ch
Exception
public void startCDATA() throws Exception
Exception
public void endCDATA() throws Exception
Exception
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |