| java.lang.Object org.apache.xerces.framework.XMLDocumentScanner
All known Subclasses: org.apache.xerces.validators.common.XMLValidator,
XMLDocumentScanner | final public class XMLDocumentScanner (Code) | | This class recognizes most of the grammer for an XML processor.
Additional support is provided by the XMLEntityHandler, via the
XMLEntityReader instances it creates, which are used to process
simple constructs like string literals and character data between
markup. The XMLDTDScanner class contains the remaining support
for the grammer of DTD declarations. When a <!DOCTYPE ...> is
found in the document, the scanDoctypeDecl method will then be
called and the XMLDocumentScanner subclass is responsible for
"connecting" that method to the corresponding method provided
by the XMLDTDScanner class.
version: $Id: XMLDocumentScanner.java,v 1.12 2001/08/08 18:20:19 neilg Exp $ |
Inner Class :public interface EventHandler | |
Inner Class :interface ScannerDispatcher | |
Inner Class :final class XMLDeclDispatcher implements ScannerDispatcher | |
Inner Class :final class PrologDispatcher implements ScannerDispatcher | |
Inner Class :final class ContentDispatcher implements ScannerDispatcher | |
Inner Class :final class TrailingMiscDispatcher implements ScannerDispatcher | |
Inner Class :final class EndOfInputDispatcher implements ScannerDispatcher | |
Method Summary | |
void | abortMarkup(int majorCode, int minorCode) | void | abortMarkup(int majorCode, int minorCode, int stringIndex1) | void | abortMarkup(int majorCode, int minorCode, String string1) | void | abortMarkup(int majorCode, int minorCode, int stringIndex1, int stringIndex2) | public boolean | atEndOfInput() | public void | endOfInput(int entityName, boolean moreToFollow) | public int | getCurrentElementType() | public boolean | getLoadExternalDTD() Returns true if loading the external DTD is turned on. | public boolean | getNamespacesEnabled() Returns whether the parser processes namespaces. | public boolean | getValidationEnabled() Returns true if validation is turned on. | public boolean | parseSome(boolean doItAll) | public void | readerChange(XMLEntityHandler.EntityReader nextReader, int nextReaderId) | void | reportFatalXMLError(int majorCode, int minorCode) | void | reportFatalXMLError(int majorCode, int minorCode, int stringIndex1) | void | reportFatalXMLError(int majorCode, int minorCode, String string1) | void | reportFatalXMLError(int majorCode, int minorCode, int stringIndex1, int stringIndex2) | void | reportFatalXMLError(int majorCode, int minorCode, String string1, String string2) | void | reportFatalXMLError(int majorCode, int minorCode, String string1, String string2, String string3) | public void | reset(StringPool stringPool, XMLEntityHandler.CharBuffer literalData) | void | restoreScannerState(int state) | public int | scanAttValue(QName element, QName attribute, boolean asSymbol) | int | scanCharRef() | void | scanComment() | boolean | scanElement(QName element) | void | scanPI(int piTarget) | void | scanXMLDeclOrTextDecl(boolean scanningTextDecl) | public void | setDTDHandler(XMLDocumentHandler.DTDHandler dtdHandler) Set the DTD handler. | public void | setEventHandler(XMLDocumentScanner.EventHandler eventHandler) | public void | setGrammarResolver(GrammarResolver resolver) Sets the grammar resolver. | public void | setLoadExternalDTD(boolean enabled) Sets whether the parser loads the external DTD. | public void | setNamespacesEnabled(boolean enabled) Sets whether the parser preprocesses namespaces. | int | setScannerState(int state) | public void | setValidationEnabled(boolean enabled) Sets whether the parser validates. | void | skipPastEndOfCurrentMarkup() |
RESULT_SUCCESSRESULT_FAILURERESULT_DUPLICATE_ATTR | final public static int RESULT_SUCCESSRESULT_FAILURERESULT_DUPLICATE_ATTR(Code) | | |
SCANNER_STATE_XML_DECLSCANNER_STATE_START_OF_MARKUPSCANNER_STATE_COMMENTSCANNER_STATE_PISCANNER_STATE_DOCTYPESCANNER_STATE_PROLOGSCANNER_STATE_ROOT_ELEMENTSCANNER_STATE_CONTENTSCANNER_STATE_REFERENCESCANNER_STATE_ATTRIBUTE_LISTSCANNER_STATE_ATTRIBUTE_NAMESCANNER_STATE_ATTRIBUTE_VALUESCANNER_STATE_TRAILING_MISCSCANNER_STATE_END_OF_INPUTSCANNER_STATE_TERMINATED | final static int SCANNER_STATE_XML_DECLSCANNER_STATE_START_OF_MARKUPSCANNER_STATE_COMMENTSCANNER_STATE_PISCANNER_STATE_DOCTYPESCANNER_STATE_PROLOGSCANNER_STATE_ROOT_ELEMENTSCANNER_STATE_CONTENTSCANNER_STATE_REFERENCESCANNER_STATE_ATTRIBUTE_LISTSCANNER_STATE_ATTRIBUTE_NAMESCANNER_STATE_ATTRIBUTE_VALUESCANNER_STATE_TRAILING_MISCSCANNER_STATE_END_OF_INPUTSCANNER_STATE_TERMINATED(Code) | | Scanner states
|
cdata_string | final static char[] cdata_string(Code) | | |
doctype_string | final static char[] doctype_string(Code) | | |
fAttValueAttrName | int fAttValueAttrName(Code) | | |
fAttValueElementType | int fAttValueElementType(Code) | | |
fAttValueMark | int fAttValueMark(Code) | | |
fAttValueOffset | int fAttValueOffset(Code) | | |
fAttValueReader | int fAttValueReader(Code) | | |
fAttrListHandle | int fAttrListHandle(Code) | | |
fCurrentElementType | int fCurrentElementType(Code) | | |
fDispatcher | ScannerDispatcher fDispatcher(Code) | | |
fEventHandler | EventHandler fEventHandler(Code) | | |
fLoadExternalDTD | boolean fLoadExternalDTD(Code) | | |
fNamespacesEnabled | boolean fNamespacesEnabled(Code) | | |
fParseTextDecl | boolean fParseTextDecl(Code) | | |
fScannerMarkupDepth | int fScannerMarkupDepth(Code) | | |
fScannerState | int fScannerState(Code) | | |
fScanningDTD | boolean fScanningDTD(Code) | | |
fSeenDoctypeDecl | boolean fSeenDoctypeDecl(Code) | | |
fSeenRootElement | boolean fSeenRootElement(Code) | | |
fStandalone | boolean fStandalone(Code) | | |
fValidationEnabled | boolean fValidationEnabled(Code) | | |
xml_string | final static char[] xml_string(Code) | | |
abortMarkup | void abortMarkup(int majorCode, int minorCode) throws Exception(Code) | | |
abortMarkup | void abortMarkup(int majorCode, int minorCode, int stringIndex1) throws Exception(Code) | | |
abortMarkup | void abortMarkup(int majorCode, int minorCode, int stringIndex1, int stringIndex2) throws Exception(Code) | | |
atEndOfInput | public boolean atEndOfInput()(Code) | | Tell if scanner has reached end of input
true if scanner has reached end of input. |
endOfInput | public void endOfInput(int entityName, boolean moreToFollow) throws Exception(Code) | | Handle the end of input
Parameters: entityName - the handle in the string pool of the name of the entity which has reached end of input Parameters: moreToFollow - if true, there is still input left to process in other readers exception: java.lang.Exception - |
getCurrentElementType | public int getCurrentElementType()(Code) | | |
getLoadExternalDTD | public boolean getLoadExternalDTD()(Code) | | Returns true if loading the external DTD is turned on.
|
getNamespacesEnabled | public boolean getNamespacesEnabled()(Code) | | Returns whether the parser processes namespaces.
|
getValidationEnabled | public boolean getValidationEnabled()(Code) | | Returns true if validation is turned on.
|
parseSome | public boolean parseSome(boolean doItAll) throws Exception(Code) | | Entry point for parsing
Parameters: doItAll - if true the entire document is parsed otherwise just the next segment of the document is parsed |
readerChange | public void readerChange(XMLEntityHandler.EntityReader nextReader, int nextReaderId) throws Exception(Code) | | Change readers
Parameters: nextReader - the new reader that the scanner will use Parameters: nextReaderId - id of the reader to change to throws java.lang.Exception |
reportFatalXMLError | void reportFatalXMLError(int majorCode, int minorCode) throws Exception(Code) | | |
reportFatalXMLError | void reportFatalXMLError(int majorCode, int minorCode, int stringIndex1) throws Exception(Code) | | |
reportFatalXMLError | void reportFatalXMLError(int majorCode, int minorCode, String string1) throws Exception(Code) | | |
reportFatalXMLError | void reportFatalXMLError(int majorCode, int minorCode, int stringIndex1, int stringIndex2) throws Exception(Code) | | |
reset | public void reset(StringPool stringPool, XMLEntityHandler.CharBuffer literalData)(Code) | | reset the parser so that the instance can be reused
Parameters: stringPool - the string pool instance to be used by the reset parser |
restoreScannerState | void restoreScannerState(int state)(Code) | | |
scanAttValue | public int scanAttValue(QName element, QName attribute, boolean asSymbol) throws Exception(Code) | | Scan an attribute value
Parameters: elementType - handle to the element whose attribute value is being scanned Parameters: attrName - handle in the string pool of the name of attribute being scanned Parameters: asSymbol - controls whether the value is a string (duplicates allowed) or a symbol (duplicates not allowed) handle in the string pool of the scanned value exception: java.lang.Exception - |
scanXMLDeclOrTextDecl | void scanXMLDeclOrTextDecl(boolean scanningTextDecl) throws Exception(Code) | | |
setGrammarResolver | public void setGrammarResolver(GrammarResolver resolver)(Code) | | Sets the grammar resolver.
|
setLoadExternalDTD | public void setLoadExternalDTD(boolean enabled)(Code) | | Sets whether the parser loads the external DTD.
|
setNamespacesEnabled | public void setNamespacesEnabled(boolean enabled)(Code) | | Sets whether the parser preprocesses namespaces.
|
setScannerState | int setScannerState(int state)(Code) | | |
setValidationEnabled | public void setValidationEnabled(boolean enabled)(Code) | | Sets whether the parser validates.
|
skipPastEndOfCurrentMarkup | void skipPastEndOfCurrentMarkup() throws Exception(Code) | | |
|
|