Save This Page
Home » Xerces-J-src.2.9.1 » org.apache.xerces » impl » [javadoc | source]
org.apache.xerces.impl
public class: XMLDocumentScannerImpl [javadoc | source]
java.lang.Object
   org.apache.xerces.impl.XMLScanner
      org.apache.xerces.impl.XMLDocumentFragmentScannerImpl
         org.apache.xerces.impl.XMLDocumentScannerImpl

All Implemented Interfaces:
    XMLComponent, XMLEntityHandler, XMLDocumentScanner

Direct Known Subclasses:
    XMLNSDocumentScannerImpl, XML11NSDocumentScannerImpl, XML11DocumentScannerImpl

This class is responsible for scanning XML document structure and content. The scanner acts as the source for the document information which is communicated to the document handler.

This component requires the following features and properties from the component manager that uses it:

Nested Class Summary:
protected final class  XMLDocumentScannerImpl.XMLDeclDispatcher  Dispatcher to handle XMLDecl scanning. 
protected final class  XMLDocumentScannerImpl.PrologDispatcher  Dispatcher to handle prolog scanning. 
protected final class  XMLDocumentScannerImpl.DTDDispatcher  Dispatcher to handle the internal and external DTD subsets. 
protected class  XMLDocumentScannerImpl.ContentDispatcher  Dispatcher to handle content scanning. 
protected final class  XMLDocumentScannerImpl.TrailingMiscDispatcher  Dispatcher to handle trailing miscellaneous section scanning. 
Field Summary
protected static final  int SCANNER_STATE_XML_DECL    Scanner state: XML declaration. 
protected static final  int SCANNER_STATE_PROLOG    Scanner state: prolog. 
protected static final  int SCANNER_STATE_TRAILING_MISC    Scanner state: trailing misc. 
protected static final  int SCANNER_STATE_DTD_INTERNAL_DECLS    Scanner state: DTD internal declarations. 
protected static final  int SCANNER_STATE_DTD_EXTERNAL    Scanner state: open DTD external subset. 
protected static final  int SCANNER_STATE_DTD_EXTERNAL_DECLS    Scanner state: DTD external declarations. 
protected static final  String LOAD_EXTERNAL_DTD    Feature identifier: load external DTD. 
protected static final  String DISALLOW_DOCTYPE_DECL_FEATURE    Feature identifier: load external DTD. 
protected static final  String DTD_SCANNER    Property identifier: DTD scanner. 
protected static final  String VALIDATION_MANAGER    property identifier: ValidationManager 
protected static final  String NAMESPACE_CONTEXT    property identifier: NamespaceContext 
protected  XMLDTDScanner fDTDScanner    DTD scanner. 
protected  ValidationManager fValidationManager    Validation manager . 
protected  boolean fScanningDTD    Scanning DTD. 
protected  String fDoctypeName    Doctype name. 
protected  String fDoctypePublicId    Doctype declaration public identifier. 
protected  String fDoctypeSystemId    Doctype declaration system identifier. 
protected  NamespaceContext fNamespaceContext    Namespace support. 
protected  boolean fLoadExternalDTD    Load external DTD. 
protected  boolean fDisallowDoctype    Disallow doctype declaration. 
protected  boolean fSeenDoctypeDecl    Seen doctype declaration. 
protected final  Dispatcher fXMLDeclDispatcher    XML declaration dispatcher. 
protected final  Dispatcher fPrologDispatcher    Prolog dispatcher. 
protected final  Dispatcher fDTDDispatcher    DTD dispatcher. 
protected final  Dispatcher fTrailingMiscDispatcher    Trailing miscellaneous section dispatcher. 
Fields inherited from org.apache.xerces.impl.XMLDocumentFragmentScannerImpl:
SCANNER_STATE_START_OF_MARKUP,  SCANNER_STATE_COMMENT,  SCANNER_STATE_PI,  SCANNER_STATE_DOCTYPE,  SCANNER_STATE_ROOT_ELEMENT,  SCANNER_STATE_CONTENT,  SCANNER_STATE_REFERENCE,  SCANNER_STATE_END_OF_INPUT,  SCANNER_STATE_TERMINATED,  SCANNER_STATE_CDATA,  SCANNER_STATE_TEXT_DECL,  NAMESPACES,  NOTIFY_BUILTIN_REFS,  ENTITY_RESOLVER,  DEBUG_CONTENT_SCANNING,  fDocumentHandler,  fEntityStack,  fMarkupDepth,  fScannerState,  fInScanContent,  fHasExternalDTD,  fStandalone,  fIsEntityDeclaredVC,  fExternalSubsetResolver,  fCurrentElement,  fElementStack,  fNotifyBuiltInRefs,  fDispatcher,  fContentDispatcher,  fElementQName,  fAttributeQName,  fAttributes,  fTempString,  fTempString2
Fields inherited from org.apache.xerces.impl.XMLScanner:
VALIDATION,  NAMESPACES,  NOTIFY_CHAR_REFS,  PARSER_SETTINGS,  SYMBOL_TABLE,  ERROR_REPORTER,  ENTITY_MANAGER,  DEBUG_ATTR_NORMALIZATION,  fValidation,  fNamespaces,  fNotifyCharRefs,  fParserSettings,  fSymbolTable,  fErrorReporter,  fEntityManager,  fEntityScanner,  fEntityDepth,  fCharRefLiteral,  fScanningAttribute,  fReportEntity,  fVersionSymbol,  fEncodingSymbol,  fStandaloneSymbol,  fAmpSymbol,  fLtSymbol,  fGtSymbol,  fQuotSymbol,  fAposSymbol,  fResourceIdentifier
Constructor:
 public XMLDocumentScannerImpl() 
Method from org.apache.xerces.impl.XMLDocumentScannerImpl Summary:
createContentDispatcher,   endEntity,   getFeatureDefault,   getPropertyDefault,   getRecognizedFeatures,   getRecognizedProperties,   getScannerStateName,   reset,   scanDoctypeDecl,   setFeature,   setInputSource,   setProperty,   startEntity
Methods from org.apache.xerces.impl.XMLDocumentFragmentScannerImpl:
createContentDispatcher,   endEntity,   getDispatcherName,   getDocumentHandler,   getFeatureDefault,   getPropertyDefault,   getRecognizedFeatures,   getRecognizedProperties,   getScannerStateName,   handleEndElement,   reset,   scanAttribute,   scanCDATASection,   scanCharReference,   scanComment,   scanContent,   scanDocument,   scanEndElement,   scanEntityReference,   scanPIData,   scanStartElement,   scanStartElementAfterName,   scanStartElementName,   scanXMLDeclOrTextDecl,   setDispatcher,   setDocumentHandler,   setFeature,   setInputSource,   setProperty,   setScannerState,   startEntity
Methods from org.apache.xerces.impl.XMLScanner:
endEntity,   getFeature,   getVersionNotSupportedKey,   isInvalid,   isInvalidLiteral,   isUnchangedByNormalization,   isValidNCName,   isValidNameChar,   isValidNameStartChar,   isValidNameStartHighSurrogate,   normalizeWhitespace,   normalizeWhitespace,   reportFatalError,   reset,   reset,   scanAttributeValue,   scanCharReferenceValue,   scanComment,   scanExternalID,   scanPI,   scanPIData,   scanPseudoAttribute,   scanPubidLiteral,   scanSurrogates,   scanXMLDeclOrTextDecl,   setFeature,   setProperty,   startEntity,   versionSupported
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xerces.impl.XMLDocumentScannerImpl Detail:
 protected Dispatcher createContentDispatcher() 
    Creates a content dispatcher.
 public  void endEntity(String name,
    Augmentations augs) throws XNIException 
    This method notifies the end of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name.
 public 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.
 public 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.
 public String[] getRecognizedFeatures() 
    Returns a list of feature identifiers that are recognized by this component. This method may return null if no features are recognized by this component.
 public String[] getRecognizedProperties() 
    Returns a list of property identifiers that are recognized by this component. This method may return null if no properties are recognized by this component.
 protected String getScannerStateName(int state) 
    Returns the scanner state name.
 public  void reset(XMLComponentManager componentManager) throws XMLConfigurationException 
    Resets the component. The component can query the component manager about any features and properties that affect the operation of the component.
 protected boolean scanDoctypeDecl() throws IOException, XNIException 
    Scans a doctype declaration.
 public  void setFeature(String featureId,
    boolean state) throws XMLConfigurationException 
    Sets the state of a feature. This method is called by the component manager any time after reset when a feature changes state.

    Note: Components should silently ignore features that do not affect the operation of the component.

 public  void setInputSource(XMLInputSource inputSource) throws IOException 
    Sets the input source.
 public  void setProperty(String propertyId,
    Object value) throws XMLConfigurationException 
    Sets the value of a property. This method is called by the component manager any time after reset when a property changes value.

    Note: Components should silently ignore properties that do not affect the operation of the component.

 public  void startEntity(String name,
    XMLResourceIdentifier identifier,
    String encoding,
    Augmentations augs) throws XNIException 
    This method notifies of the start of an entity. The DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name.