public class XMLDocumentScannerImpl extends XMLDocumentFragmentScannerImpl
This component requires the following features and properties from the component manager that uses it:
Modifier and Type | Class and Description |
---|---|
protected class |
XMLDocumentScannerImpl.ContentDispatcher
Dispatcher to handle content scanning.
|
protected class |
XMLDocumentScannerImpl.DTDDispatcher
Dispatcher to handle the internal and external DTD subsets.
|
protected class |
XMLDocumentScannerImpl.PrologDispatcher
Dispatcher to handle prolog scanning.
|
protected class |
XMLDocumentScannerImpl.TrailingMiscDispatcher
Dispatcher to handle trailing miscellaneous section scanning.
|
protected class |
XMLDocumentScannerImpl.XMLDeclDispatcher
Dispatcher to handle XMLDecl scanning.
|
XMLDocumentFragmentScannerImpl.Dispatcher, XMLDocumentFragmentScannerImpl.ElementStack, XMLDocumentFragmentScannerImpl.FragmentContentDispatcher
Modifier and Type | Field and Description |
---|---|
protected static String |
DISALLOW_DOCTYPE_DECL_FEATURE
Feature identifier: load external DTD.
|
protected static String |
DTD_SCANNER
Property identifier: DTD scanner.
|
protected boolean |
fDisallowDoctype
Disallow doctype declaration.
|
protected String |
fDoctypeName
Doctype name.
|
protected String |
fDoctypePublicId
Doctype declaration public identifier.
|
protected String |
fDoctypeSystemId
Doctype declaration system identifier.
|
protected XMLDocumentFragmentScannerImpl.Dispatcher |
fDTDDispatcher
DTD dispatcher.
|
protected XMLDTDScanner |
fDTDScanner
DTD scanner.
|
protected boolean |
fLoadExternalDTD
Load external DTD.
|
protected NamespaceContext |
fNamespaceContext
Namespace support.
|
protected XMLDocumentFragmentScannerImpl.Dispatcher |
fPrologDispatcher
Prolog dispatcher.
|
protected boolean |
fScanningDTD
Scanning DTD.
|
protected boolean |
fSeenDoctypeDecl
Seen doctype declaration.
|
protected XMLDocumentFragmentScannerImpl.Dispatcher |
fTrailingMiscDispatcher
Trailing miscellaneous section dispatcher.
|
protected ValidationManager |
fValidationManager
Validation manager .
|
protected XMLDocumentFragmentScannerImpl.Dispatcher |
fXMLDeclDispatcher
XML declaration dispatcher.
|
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_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
property identifier: ValidationManager
|
DEBUG_CONTENT_SCANNING, ENTITY_RESOLVER, fAttributeQName, fAttributes, fContentDispatcher, fCurrentElement, fDispatcher, fDocumentHandler, fElementQName, fElementStack, fEntityStack, fExternalSubsetResolver, fHasExternalDTD, fInScanContent, fIsEntityDeclaredVC, fMarkupDepth, fNotifyBuiltInRefs, fScannerState, fStandalone, fTempString, fTempString2, NAMESPACES, NOTIFY_BUILTIN_REFS, SCANNER_STATE_CDATA, SCANNER_STATE_COMMENT, SCANNER_STATE_CONTENT, SCANNER_STATE_DOCTYPE, SCANNER_STATE_END_OF_INPUT, SCANNER_STATE_PI, SCANNER_STATE_REFERENCE, SCANNER_STATE_ROOT_ELEMENT, SCANNER_STATE_START_OF_MARKUP, SCANNER_STATE_TERMINATED, SCANNER_STATE_TEXT_DECL
DEBUG_ATTR_NORMALIZATION, ENTITY_MANAGER, ERROR_REPORTER, fAmpSymbol, fAposSymbol, fCharRefLiteral, fEncodingSymbol, fEntityDepth, fEntityManager, fEntityScanner, fErrorReporter, fGtSymbol, fLtSymbol, fNamespaces, fNotifyCharRefs, fParserSettings, fQuotSymbol, fReportEntity, fResourceIdentifier, fScanningAttribute, fStandaloneSymbol, fSymbolTable, fValidation, fVersionSymbol, NOTIFY_CHAR_REFS, PARSER_SETTINGS, SYMBOL_TABLE, VALIDATION
Constructor and Description |
---|
XMLDocumentScannerImpl()
Default constructor.
|
Modifier and Type | Method and Description |
---|---|
protected XMLDocumentFragmentScannerImpl.Dispatcher |
createContentDispatcher()
Creates a content dispatcher.
|
void |
endEntity(String name,
Augmentations augs)
This method notifies the end of an entity.
|
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.
|
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.
|
void |
reset(XMLComponentManager componentManager)
Resets the component.
|
protected boolean |
scanDoctypeDecl()
Scans a doctype declaration.
|
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.
|
getDispatcherName, getDocumentHandler, handleEndElement, scanAttribute, scanCDATASection, scanCharReference, scanComment, scanContent, scanDocument, scanEndElement, scanEntityReference, scanPIData, scanStartElement, scanStartElementAfterName, scanStartElementName, scanXMLDeclOrTextDecl, setDispatcher, setDocumentHandler, setScannerState
getFeature, getVersionNotSupportedKey, isInvalid, isInvalidLiteral, isUnchangedByNormalization, isValidNameChar, isValidNameStartChar, isValidNameStartHighSurrogate, isValidNCName, normalizeWhitespace, normalizeWhitespace, reportFatalError, reset, scanAttributeValue, scanCharReferenceValue, scanComment, scanExternalID, scanPI, scanPseudoAttribute, scanPubidLiteral, scanSurrogates, scanXMLDeclOrTextDecl, versionSupported
protected 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 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 boolean fScanningDTD
protected String fDoctypeName
protected String fDoctypePublicId
protected String fDoctypeSystemId
protected NamespaceContext fNamespaceContext
protected boolean fLoadExternalDTD
protected boolean fDisallowDoctype
protected boolean fSeenDoctypeDecl
protected final XMLDocumentFragmentScannerImpl.Dispatcher fXMLDeclDispatcher
protected final XMLDocumentFragmentScannerImpl.Dispatcher fPrologDispatcher
protected final XMLDocumentFragmentScannerImpl.Dispatcher fDTDDispatcher
protected final XMLDocumentFragmentScannerImpl.Dispatcher fTrailingMiscDispatcher
public void setInputSource(XMLInputSource inputSource) throws IOException
setInputSource
in interface XMLDocumentScanner
setInputSource
in class XMLDocumentFragmentScannerImpl
inputSource
- The input source.IOException
- Thrown on i/o error.public void reset(XMLComponentManager componentManager) throws XMLConfigurationException
reset
in interface XMLComponent
reset
in class XMLDocumentFragmentScannerImpl
componentManager
- 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.XMLConfigurationException
public String[] getRecognizedFeatures()
getRecognizedFeatures
in interface XMLComponent
getRecognizedFeatures
in class XMLDocumentFragmentScannerImpl
public 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 XMLComponent
setFeature
in class XMLDocumentFragmentScannerImpl
featureId
- 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 XMLComponent
getRecognizedProperties
in class XMLDocumentFragmentScannerImpl
public 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 XMLComponent
setProperty
in class XMLDocumentFragmentScannerImpl
propertyId
- 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 XMLComponent
getFeatureDefault
in class XMLDocumentFragmentScannerImpl
featureId
- The feature identifier.public Object getPropertyDefault(String propertyId)
getPropertyDefault
in interface XMLComponent
getPropertyDefault
in class XMLDocumentFragmentScannerImpl
propertyId
- The property identifier.public void startEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException
startEntity
in interface XMLEntityHandler
startEntity
in class XMLDocumentFragmentScannerImpl
name
- 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 XNIException
endEntity
in interface XMLEntityHandler
endEntity
in class XMLDocumentFragmentScannerImpl
name
- The name of the entity.augs
- Additional information that may include infoset augmentationsXNIException
- Thrown by handler to signal an error.protected XMLDocumentFragmentScannerImpl.Dispatcher createContentDispatcher()
createContentDispatcher
in class XMLDocumentFragmentScannerImpl
protected boolean scanDoctypeDecl() throws IOException, XNIException
IOException
XNIException
protected String getScannerStateName(int state)
getScannerStateName
in class XMLDocumentFragmentScannerImpl
Copyright © 2021 JBoss by Red Hat. All rights reserved.