public class XMLDocumentScannerImpl extends XMLDocumentFragmentScannerImpl
| Modifier and Type | Class and Description |
|---|---|
protected class |
XMLDocumentScannerImpl.ContentDriver
Driver to handle content scanning.
|
protected class |
XMLDocumentScannerImpl.DTDDriver
Driver to handle the internal and external DTD subsets.
|
protected class |
XMLDocumentScannerImpl.PrologDriver
Driver to handle prolog scanning.
|
protected class |
XMLDocumentScannerImpl.TrailingMiscDriver
Driver to handle trailing miscellaneous section scanning.
|
protected class |
XMLDocumentScannerImpl.XMLDeclDriver
Driver to handle XMLDecl scanning.
|
XMLDocumentFragmentScannerImpl.Driver, XMLDocumentFragmentScannerImpl.Element, XMLDocumentFragmentScannerImpl.ElementStack, XMLDocumentFragmentScannerImpl.ElementStack2, XMLDocumentFragmentScannerImpl.FragmentContentDriver| Modifier and Type | Field and Description |
|---|---|
protected static String |
DISALLOW_DOCTYPE_DECL_FEATURE
Feature identifier: load external DTD.
|
protected static String |
DOCUMENT_SCANNER
Property identifier document scanner:
|
protected static String |
DTD_SCANNER
Property identifier: DTD scanner.
|
protected boolean |
fAddedListener |
protected String |
fDoctypeName
Doctype name.
|
protected String |
fDoctypePublicId
Doctype declaration public identifier.
|
protected String |
fDoctypeSystemId
Doctype declaration system identifier.
|
protected XMLStringBuffer |
fDTDDecl |
protected XMLDocumentFragmentScannerImpl.Driver |
fDTDDriver
DTD driver.
|
protected XMLDTDScanner |
fDTDScanner
DTD scanner.
|
protected int |
fEndPos |
protected boolean |
fLoadExternalDTD
Load external DTD.
|
protected NamespaceContext |
fNamespaceContext
Namespace support.
|
protected XMLDocumentFragmentScannerImpl.Driver |
fPrologDriver
Prolog driver.
|
protected boolean |
fReadingDTD |
protected boolean |
fScanEndElement |
protected boolean |
fSeenDoctypeDecl
Seen doctype declaration.
|
protected boolean |
fSeenInternalSubset |
protected int |
fStartPos |
protected XMLDocumentFragmentScannerImpl.Driver |
fTrailingMiscDriver
Trailing miscellaneous section driver.
|
protected ValidationManager |
fValidationManager
Validation manager .
|
protected XMLDocumentFragmentScannerImpl.Driver |
fXMLDeclDriver
XML declaration driver.
|
protected static String |
LOAD_EXTERNAL_DTD
Feature identifier: load external DTD.
|
protected static String |
NAMESPACE_CONTEXT
property identifier: NamespaceContext
|
protected static int |
SCANNER_STATE_DTD_EXTERNAL
Scanner state: open DTD external subset.
|
protected static int |
SCANNER_STATE_DTD_EXTERNAL_DECLS
Scanner state: DTD external declarations.
|
protected static int |
SCANNER_STATE_DTD_INTERNAL_DECLS
Scanner state: DTD internal declarations.
|
protected static int |
SCANNER_STATE_NO_SUCH_ELEMENT_EXCEPTION
Scanner state: NO MORE ELEMENTS.
|
protected static int |
SCANNER_STATE_PROLOG
Scanner state: prolog.
|
protected static int |
SCANNER_STATE_TRAILING_MISC
Scanner state: trailing misc.
|
protected static int |
SCANNER_STATE_XML_DECL
Scanner state: XML declaration.
|
protected static String |
VALIDATION_MANAGER |
DEBUG, DEBUG_COALESCE, DEBUG_NEXT, DEBUG_START_END_ELEMENT, dtdGrammarUtil, ENTITY_RESOLVER, fAccessExternalDTD, fAdd, fAddDefaultAttr, fAttributeQName, fAttributes, fContentBuffer, fContentDriver, fCurrentElement, fDeclaredEncoding, fDisallowDoctype, fDocumentHandler, fDriver, fElementAttributeLimit, fElementQName, fElementRawname, fElementStack, fElementStack2, fEmptyElement, fEntityStack, fEntityStore, fExternalSubsetResolver, fHasExternalDTD, fInScanContent, fIsCoalesce, fLastSectionWasCData, fLastSectionWasCharacterData, fLastSectionWasEntityReference, fMarkupDepth, fNotifyBuiltInRefs, foundBuiltInRefs, fPIData, fPITarget, fReadingAttributes, fReplaceEntityReferences, fReportCdataEvent, fScannerLastState, fScannerState, fScanToEnd, fShouldSkip, fSkip, fStandalone, fStandaloneSet, fStrictURI, fStringBuffer, fStringBuffer2, fSupportDTD, fSupportExternalEntities, fTempString, fTempString2, fUsebuffer, fVersion, NOTIFY_BUILTIN_REFS, SCANNER_STATE_ATTRIBUTE, SCANNER_STATE_ATTRIBUTE_VALUE, SCANNER_STATE_BUILT_IN_REFS, SCANNER_STATE_CDATA, SCANNER_STATE_CHAR_REFERENCE, SCANNER_STATE_CHARACTER_DATA, SCANNER_STATE_COMMENT, SCANNER_STATE_CONTENT, SCANNER_STATE_DOCTYPE, SCANNER_STATE_END_ELEMENT_TAG, SCANNER_STATE_END_OF_INPUT, SCANNER_STATE_PI, SCANNER_STATE_REFERENCE, SCANNER_STATE_ROOT_ELEMENT, SCANNER_STATE_START_ELEMENT_TAG, SCANNER_STATE_START_OF_MARKUP, SCANNER_STATE_TERMINATED, SCANNER_STATE_TEXT_DECL, STANDARD_URI_CONFORMANTattributeValueCache, DEBUG_ATTR_NORMALIZATION, ENTITY_MANAGER, ERROR_REPORTER, fAmpSymbol, fAposSymbol, fAttributeCacheInitDone, fAttributeCacheUsedCount, fCharRefLiteral, fEncodingSymbol, fEntityDepth, fEntityManager, fEntityScanner, fErrorReporter, fEvent, fGtSymbol, fLimitAnalyzer, fLtSymbol, fNamespaces, fNotifyCharRefs, fParserSettings, fPropertyManager, fQuotSymbol, fReportEntity, fResourceIdentifier, fScanningAttribute, fSecurityManager, fStandaloneSymbol, fStringBufferIndex, fSymbolTable, fValidation, fVersionSymbol, NAMESPACES, NOTIFY_CHAR_REFS, PARSER_SETTINGS, stringBufferCache, SYMBOL_TABLE, VALIDATION| Constructor and Description |
|---|
XMLDocumentScannerImpl()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected XMLDocumentFragmentScannerImpl.Driver |
createContentDriver()
Creates a content driver.
|
void |
endEntity(String name,
Augmentations augs)
This method notifies the end of an entity.
|
String |
getCharacterEncodingScheme() |
XMLStringBuffer |
getDTDDecl() |
Boolean |
getFeatureDefault(String featureId)
Returns the default state for a feature, or null if this
component does not want to report a default value for this
feature.
|
NamespaceContext |
getNamespaceContext() |
Object |
getPropertyDefault(String propertyId)
Returns the default state for a property, or null if this
component does not want to report a default value for this
property.
|
String[] |
getRecognizedFeatures()
Returns a list of feature identifiers that are recognized by
this component.
|
String[] |
getRecognizedProperties()
Returns a list of property identifiers that are recognized by
this component.
|
protected String |
getScannerStateName(int state)
Returns the scanner state name.
|
int |
getScannetState()
return the state of the scanner
|
int |
next()
return the next state on the input
|
void |
refresh(int refreshPosition)
receives callbacks from
XMLEntityReader when buffer
is being changed. |
void |
reset(PropertyManager propertyManager) |
void |
reset(XMLComponentManager componentManager)
Resets the component.
|
protected boolean |
scanDoctypeDecl(boolean supportDTD)
Scans a doctype declaration.
|
protected void |
setEndDTDScanState()
Set the scanner state after scanning DTD
|
void |
setFeature(String featureId,
boolean state)
Sets the state of a feature.
|
void |
setInputSource(XMLInputSource inputSource)
Sets the input source.
|
void |
setProperty(String propertyId,
Object value)
Sets the value of a property.
|
void |
startEntity(String name,
XMLResourceIdentifier identifier,
String encoding,
Augmentations augs)
This method notifies of the start of an entity.
|
getAttributeIterator, getCharacterData, getComment, getDocumentHandler, getDriverName, getElementQName, getEntityName, getPIData, getPITarget, getString, hasAttributes, isStandAlone, refresh, scanAttribute, scanCDATASection, scanCharReference, scanComment, scanContent, scanDocument, scanEndElement, scanEntityReference, scanPIData, scanStartElement, scanXMLDeclOrTextDecl, seekCloseOfStartTag, setDocumentHandler, setDriver, setScannerState, skipElement, standaloneSetgetFeature, isInvalid, isInvalidLiteral, isValidNameChar, isValidNameStartChar, isValidNCName, normalizeWhitespace, reportFatalError, reset, scanAttributeValue, scanCharReferenceValue, scanComment, scanExternalID, scanPI, scanPseudoAttribute, scanPubidLiteral, scanSurrogates, scanXMLDeclOrTextDecl, setPropertyManager, versionSupportedprotected static final int SCANNER_STATE_XML_DECL
protected static final int SCANNER_STATE_PROLOG
protected static final int SCANNER_STATE_TRAILING_MISC
protected static final int SCANNER_STATE_DTD_INTERNAL_DECLS
protected static final int SCANNER_STATE_DTD_EXTERNAL
protected static final int SCANNER_STATE_DTD_EXTERNAL_DECLS
protected static final int SCANNER_STATE_NO_SUCH_ELEMENT_EXCEPTION
protected static final String DOCUMENT_SCANNER
protected static final String LOAD_EXTERNAL_DTD
protected static final String DISALLOW_DOCTYPE_DECL_FEATURE
protected static final String DTD_SCANNER
protected static final String VALIDATION_MANAGER
protected static final String NAMESPACE_CONTEXT
protected XMLDTDScanner fDTDScanner
protected ValidationManager fValidationManager
protected XMLStringBuffer fDTDDecl
protected boolean fReadingDTD
protected boolean fAddedListener
protected String fDoctypeName
protected String fDoctypePublicId
protected String fDoctypeSystemId
protected NamespaceContext fNamespaceContext
protected boolean fLoadExternalDTD
protected boolean fSeenDoctypeDecl
protected boolean fScanEndElement
protected XMLDocumentFragmentScannerImpl.Driver fXMLDeclDriver
protected XMLDocumentFragmentScannerImpl.Driver fPrologDriver
protected XMLDocumentFragmentScannerImpl.Driver fDTDDriver
protected XMLDocumentFragmentScannerImpl.Driver fTrailingMiscDriver
protected int fStartPos
protected int fEndPos
protected boolean fSeenInternalSubset
public void setInputSource(XMLInputSource inputSource) throws IOException
setInputSource in interface XMLDocumentScannersetInputSource in class XMLDocumentFragmentScannerImplinputSource - The input source.IOException - Thrown on i/o error.public int getScannetState()
public void reset(PropertyManager propertyManager)
reset in class XMLDocumentFragmentScannerImplpublic void reset(XMLComponentManager componentManager) throws XMLConfigurationException
reset in interface XMLComponentreset in class XMLDocumentFragmentScannerImplcomponentManager - The component manager.SAXException - Thrown by component on initialization error.
For example, if a feature or property is
required for the operation of the component, the
component manager may throw a
SAXNotRecognizedException or a
SAXNotSupportedException.XMLConfigurationExceptionpublic String[] getRecognizedFeatures()
getRecognizedFeatures in interface XMLComponentgetRecognizedFeatures in class XMLDocumentFragmentScannerImplpublic void setFeature(String featureId, boolean state) throws XMLConfigurationException
Note: Components should silently ignore features that do not affect the operation of the component.
setFeature in interface XMLComponentsetFeature in class XMLDocumentFragmentScannerImplfeatureId - The feature identifier.state - The state of the feature.SAXNotRecognizedException - The component should not throw
this exception.SAXNotSupportedException - The component should not throw
this exception.XMLConfigurationException - Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public String[] getRecognizedProperties()
getRecognizedProperties in interface XMLComponentgetRecognizedProperties in class XMLDocumentFragmentScannerImplpublic void setProperty(String propertyId, Object value) throws XMLConfigurationException
Note: Components should silently ignore properties that do not affect the operation of the component.
setProperty in interface XMLComponentsetProperty in class XMLDocumentFragmentScannerImplpropertyId - The property identifier.value - The value of the property.SAXNotRecognizedException - The component should not throw
this exception.SAXNotSupportedException - The component should not throw
this exception.XMLConfigurationException - Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public Boolean getFeatureDefault(String featureId)
getFeatureDefault in interface XMLComponentgetFeatureDefault in class XMLDocumentFragmentScannerImplfeatureId - The feature identifier.public Object getPropertyDefault(String propertyId)
getPropertyDefault in interface XMLComponentgetPropertyDefault in class XMLDocumentFragmentScannerImplpropertyId - The property identifier.public void startEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException
startEntity in interface XMLEntityHandlerstartEntity in class XMLDocumentFragmentScannerImplname - The name of the entity.identifier - The resource identifier.encoding - The auto-detected IANA encoding name of the entity
stream. This value will be null in those situations
where the entity encoding is not auto-detected (e.g.
internal entities or a document entity that is
parsed from a java.io.Reader).augs - Additional information that may include infoset augmentationsXNIException - Thrown by handler to signal an error.public void endEntity(String name, Augmentations augs) throws IOException, XNIException
endEntity in interface XMLEntityHandlerendEntity in class XMLDocumentFragmentScannerImplname - The name of the entity.augs - Additional information that may include infoset augmentationsXNIException - Thrown by handler to signal an error.IOException - This exception might be thrown when there is premature end of entitypublic XMLStringBuffer getDTDDecl()
public String getCharacterEncodingScheme()
public int next()
throws IOException,
XNIException
next in interface XMLDocumentScannernext in class XMLDocumentFragmentScannerImplIOExceptionXNIExceptionpublic NamespaceContext getNamespaceContext()
protected XMLDocumentFragmentScannerImpl.Driver createContentDriver()
createContentDriver in class XMLDocumentFragmentScannerImplprotected boolean scanDoctypeDecl(boolean supportDTD)
throws IOException,
XNIException
IOExceptionXNIExceptionprotected void setEndDTDScanState()
protected String getScannerStateName(int state)
getScannerStateName in class XMLDocumentFragmentScannerImplpublic void refresh(int refreshPosition)
XMLEntityReader when buffer
is being changed.refresh in interface XMLBufferListenerrefresh in class XMLDocumentFragmentScannerImplrefreshPosition - Copyright © 2018–2021 mhoffrogge. All rights reserved.