Overview | Package | Class | Use | Tree | Deprecated | Index | Help
|  | BEA Systems, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

WebLogic Server 8.1 API Reference

## weblogic.apache.xerces.impl
Class XMLDocumentScannerImpl

    java.lang.Object
      |
      +--weblogic.apache.xerces.impl.XMLScanner
            |
            +--weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl
                  |
                  +--weblogic.apache.xerces.impl.XMLDocumentScannerImpl

Direct Known Subclasses:
  XML11DocumentScannerImpl

public class XMLDocumentScannerImpl
extends XMLDocumentFragmentScannerImpl

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:

- http://xml.org/sax/features/namespaces
- http://xml.org/sax/features/validation
- http://apache.org/xml/features/nonvalidating/load-external-dtd
- http://apache.org/xml/features/scanner/notify-char-refs
- http://apache.org/xml/features/scanner/notify-builtin-refs
- http://apache.org/xml/properties/internal/symbol-table
- http://apache.org/xml/properties/internal/error-reporter
- http://apache.org/xml/properties/internal/entity-manager
- http://apache.org/xml/properties/internal/dtd-scanner

Inner Class Summary
`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.

Inner classes inherited from class weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl
`XMLDocumentFragmentScannerImpl.Dispatcher, XMLDocumentFragmentScannerImpl.ElementStack, XMLDocumentFragmentScannerImpl.FragmentContentDispatcher`

Field Summary
`protected static java.lang.String` | `DTD_SCANNER` Property identifier: DTD scanner.
`protected java.lang.String` | `fDoctypeName` Doctype name.
`protected java.lang.String` | `fDoctypePublicId` Doctype declaration public identifier.
`protected java.lang.String` | `fDoctypeSystemId` Doctype declaration system identifier.
`protected XMLDocumentFragmentScannerImpl.Dispatcher` | `fDTDDispatcher` DTD dispatcher.
`protected XMLDTDScanner` | `fDTDScanner` DTD scanner.
`protected boolean` | `fLoadExternalDTD` Load external DTD.
`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 java.lang.String` | `LOAD_EXTERNAL_DTD` Feature identifier: load external DTD.
`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 java.lang.String` | `VALIDATION_MANAGER`

Fields inherited from class weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl
`fContentDispatcher, fCurrentElement, fDispatcher, fDocumentHandler, fDocumentSystemId, fElementStack, fEntityStack, fHasExternalDTD, fInScanContent, fMarkupDepth, fNamespaces, fNotifyBuiltInRefs, fScannerState, fStandalone, 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`

Fields inherited from class weblogic.apache.xerces.impl.XMLScanner
`DEBUG_ATTR_NORMALIZATION, ENTITY_MANAGER, ERROR_REPORTER, fAmpSymbol, fAposSymbol, fCharRefLiteral, fEncodingSymbol, fEntityDepth, fEntityManager, fEntityScanner, fErrorReporter, fGtSymbol, fLtSymbol, fNotifyCharRefs, fQuotSymbol, fReportEntity, fResourceIdentifier, fScanningAttribute, fStandaloneSymbol, fSymbolTable, fValidation, fVersionSymbol, NOTIFY_CHAR_REFS, SYMBOL_TABLE, VALIDATION`

Constructor Summary
`XMLDocumentScannerImpl()` Default constructor.

Method Summary
`protected XMLDocumentFragmentScannerImpl.Dispatcher` | `createContentDispatcher()` Creates a content dispatcher.
`void` | `endEntity(java.lang.String name)` This method notifies the end of an entity.
`java.lang.String[]` | `getRecognizedFeatures()` Returns a list of feature identifiers that are recognized by this component.
`java.lang.String[]` | `getRecognizedProperties()` Returns a list of property identifiers that are recognized by this component.
`protected java.lang.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(java.lang.String featureId, boolean state)` Sets the state of a feature.
`void` | `setInputSource(XMLInputSource inputSource)` Sets the input source.
`void` | `setProperty(java.lang.String propertyId, java.lang.Object value)` Sets the value of a property.
`void` | `startEntity(java.lang.String name, XMLResourceIdentifier identifier, java.lang.String encoding)` This method notifies of the start of an entity.

Methods inherited from class weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl
`getDispatcherName, getDocumentHandler, handleEndElement, scanAttribute, scanCDATASection, scanCharReference, scanComment, scanContent, scanDocument, scanEndElement, scanEntityReference, scanPIData, scanStartElement, scanXMLDeclOrTextDecl, setDispatcher, setDocumentHandler, setScannerState`

Methods inherited from class weblogic.apache.xerces.impl.XMLScanner
`getFeature, normalizeWhitespace, reportFatalError, reset, scanAttributeValue, scanCharReferenceValue, scanComment, scanExternalID, scanPI, scanPseudoAttribute, scanPubidLiteral, scanSurrogates, scanXMLDeclOrTextDecl`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SCANNER_STATE_XML_DECL

    protected static final int SCANNER_STATE_XML_DECL

  Scanner state: XML declaration.

### SCANNER_STATE_PROLOG

    protected static final int SCANNER_STATE_PROLOG

  Scanner state: prolog.

### SCANNER_STATE_TRAILING_MISC

    protected static final int SCANNER_STATE_TRAILING_MISC

  Scanner state: trailing misc.

### SCANNER_STATE_DTD_INTERNAL_DECLS

    protected static final int SCANNER_STATE_DTD_INTERNAL_DECLS

  Scanner state: DTD internal declarations.

### SCANNER_STATE_DTD_EXTERNAL

    protected static final int SCANNER_STATE_DTD_EXTERNAL

  Scanner state: open DTD external subset.

### SCANNER_STATE_DTD_EXTERNAL_DECLS

    protected static final int SCANNER_STATE_DTD_EXTERNAL_DECLS

  Scanner state: DTD external declarations.

### LOAD_EXTERNAL_DTD

    protected static final java.lang.String LOAD_EXTERNAL_DTD

  Feature identifier: load external DTD.

### DTD_SCANNER

    protected static final java.lang.String DTD_SCANNER

  Property identifier: DTD scanner.

### VALIDATION_MANAGER

    protected static final java.lang.String VALIDATION_MANAGER

### fDTDScanner

    protected XMLDTDScanner fDTDScanner

  DTD scanner.

### fValidationManager

    protected ValidationManager fValidationManager

  Validation manager .

### fScanningDTD

    protected boolean fScanningDTD

  Scanning DTD.

### fDoctypeName

    protected java.lang.String fDoctypeName

  Doctype name.

### fDoctypePublicId

    protected java.lang.String fDoctypePublicId

  Doctype declaration public identifier.

### fDoctypeSystemId

    protected java.lang.String fDoctypeSystemId

  Doctype declaration system identifier.

### fLoadExternalDTD

    protected boolean fLoadExternalDTD

  Load external DTD.

### fSeenDoctypeDecl

    protected boolean fSeenDoctypeDecl

  Seen doctype declaration.

### fXMLDeclDispatcher

    protected XMLDocumentFragmentScannerImpl.Dispatcher fXMLDeclDispatcher

  XML declaration dispatcher.

### fPrologDispatcher

    protected XMLDocumentFragmentScannerImpl.Dispatcher fPrologDispatcher

  Prolog dispatcher.

### fDTDDispatcher

    protected XMLDocumentFragmentScannerImpl.Dispatcher fDTDDispatcher

  DTD dispatcher.

### fTrailingMiscDispatcher

    protected XMLDocumentFragmentScannerImpl.Dispatcher fTrailingMiscDispatcher

  Trailing miscellaneous section dispatcher.

Constructor Detail

### XMLDocumentScannerImpl

    public XMLDocumentScannerImpl()

  Default constructor.

Method Detail

### setInputSource

    public void setInputSource(XMLInputSource inputSource)
                        throws java.io.IOException

  Sets the input source.

  Parameters:
    `inputSource` - The input source.
  Throws:
    java.io.IOException - Thrown on i/o error.
  Overrides:
    setInputSource in class XMLDocumentFragmentScannerImpl

### reset

    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.

  Parameters:
    `componentManager` - The component manager.
  Throws:
    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.
  Overrides:
    reset in class XMLDocumentFragmentScannerImpl

### getRecognizedFeatures

    public java.lang.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.

  Overrides:
    getRecognizedFeatures in class XMLDocumentFragmentScannerImpl

### setFeature

    public void setFeature(java.lang.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.

  Parameters:
    `featureId` - The feature identifier.
    `state` - The state of the feature.
  Throws:
    SAXNotRecognizedException - The component should not throw this exception.
    SAXNotSupportedException - The component should not throw this exception.
  Overrides:
    setFeature in class XMLDocumentFragmentScannerImpl

### getRecognizedProperties

    public java.lang.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.

  Overrides:
    getRecognizedProperties in class XMLDocumentFragmentScannerImpl

### setProperty

    public void setProperty(java.lang.String propertyId,
                            java.lang.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.

  Parameters:
    `propertyId` - The property identifier.
    `value` - The value of the property.
  Throws:
    SAXNotRecognizedException - The component should not throw this exception.
    SAXNotSupportedException - The component should not throw this exception.
  Overrides:
    setProperty in class XMLDocumentFragmentScannerImpl

### startEntity

    public void startEntity(java.lang.String name,
                            XMLResourceIdentifier identifier,
                            java.lang.String encoding)
                     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.

  Parameters:
    `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).
  Throws:
    XNIException - Thrown by handler to signal an error.
  Overrides:
    startEntity in class XMLDocumentFragmentScannerImpl

### endEntity

    public void endEntity(java.lang.String name)
                   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.

  Parameters:
    `name` - The name of the entity.
  Throws:
    XNIException - Thrown by handler to signal an error.
  Overrides:
    endEntity in class XMLDocumentFragmentScannerImpl

### createContentDispatcher

    protected XMLDocumentFragmentScannerImpl.Dispatcher createContentDispatcher()

  Creates a content dispatcher.

  Overrides:
    createContentDispatcher in class XMLDocumentFragmentScannerImpl

### scanDoctypeDecl

    protected boolean scanDoctypeDecl()
                               throws java.io.IOException,
                                      XNIException

  Scans a doctype declaration.

### getScannerStateName

    protected java.lang.String getScannerStateName(int state)

  Returns the scanner state name.

  Overrides:
    getScannerStateName in class XMLDocumentFragmentScannerImpl

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs81
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD