|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | 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)
Inner 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 java.lang.Exception
public void endDocument() throws java.lang.Exception
public void xmlDecl(int version, int encoding, int standalone) throws java.lang.Exception
version
- the handle in the string pool for the version numberencoding
- the handle in the string pool for the encodingstandalong
- the handle in the string pool for the standalone valuepublic void textDecl(int version, int encoding) throws java.lang.Exception
public void startNamespaceDeclScope(int prefix, int uri) throws java.lang.Exception
prefix
- string pool index of the namespace prefix being declareduri
- string pool index of the namespace uri begin boundjava.lang.Exception
- public void endNamespaceDeclScope(int prefix) throws java.lang.Exception
prefix
- string pool index of the namespace prefix being declaredpublic void startElement(QName element, XMLAttrList attrList, int attrListHandle) throws java.lang.Exception
elementType
- element handle for the element being scannedattrList
- attrList containing the attributes of the elementattrListHandle
- handle into attrList. Allows attributes to be retreived.public void endElement(QName element) throws java.lang.Exception
elementType
- element handle for the element being scannedpublic void startEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
entityName
- string pool index of the entity nameentityType
- the XMLEntityHandler.ENTITYTYPE_* typeentityContext
- the XMLEntityHandler.ENTITYREF_* type for where
the entity reference appearsXMLEntityHandler
,
XMLEntityHandler
public void endEntityReference(int entityName, int entityType, int entityContext) throws java.lang.Exception
entityName
- string pool index of the entity anementityType
- the XMLEntityHandler.ENTITYTYPE_* typeentityContext
- the XMLEntityHandler.ENTITYREF_* type for where
the entity reference appearsXMLEntityHandler
,
XMLEntityHandler
public void processingInstruction(int target, int data) throws java.lang.Exception
target
- string pool index of the PI targetdata
- string pool index of the PI datapublic void comment(int comment) throws java.lang.Exception
comment
- string pool index of the comment textpublic void characters(int data) throws java.lang.Exception
data
- string pool index of the characters that were scannedpublic void characters(char[] ch, int start, int length) throws java.lang.Exception
ch
- character array containing the characters that were scannedstart
- offset in ch where scanned characters beginlength
- length of scanned characters in chpublic void ignorableWhitespace(int data) throws java.lang.Exception
data
- string pool index of ignorable whitespacepublic void ignorableWhitespace(char[] ch, int start, int length) throws java.lang.Exception
ch
- character array containing the whitespace that was scannedstart
- offset in ch where scanned whitespace beginslength
- length of scanned whitespace in chpublic void startCDATA() throws java.lang.Exception
public void endCDATA() throws java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |