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

## weblogic.apache.xerces.impl
Class XMLDocumentFragmentScannerImpl

    java.lang.Object
      weblogic.apache.xerces.impl.XMLScanner
          weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl

All Implemented Interfaces:
  XMLEntityHandler, XMLComponent, XMLDocumentScanner, XMLDocumentSource

Direct Known Subclasses:
  XMLDocumentScannerImpl

Deprecated. please use JDK supplied XML parsers and transformers

    public class XMLDocumentFragmentScannerImpl

extends XMLScanner
implements XMLDocumentScanner, XMLComponent, XMLEntityHandler

This class is responsible for scanning the structure and content of document fragments. 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/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

Nested Class Summary
`protected static interface` | `XMLDocumentFragmentScannerImpl.Dispatcher` Deprecated. This interface defines an XML "event" dispatching model.
`protected static class` | `XMLDocumentFragmentScannerImpl.ElementStack` Deprecated. Element stack.
`protected class` | `XMLDocumentFragmentScannerImpl.FragmentContentDispatcher` Deprecated. Dispatcher to handle content scanning.

Field Summary
`protected XMLDocumentFragmentScannerImpl.Dispatcher` | `fContentDispatcher` Deprecated. Content dispatcher.
`protected QName` | `fCurrentElement` Deprecated. Current element.
`protected XMLDocumentFragmentScannerImpl.Dispatcher` | `fDispatcher` Deprecated. Active dispatcher.
`protected XMLDocumentHandler` | `fDocumentHandler` Deprecated. Document handler.
`protected String` | `fDocumentSystemId` Deprecated. Document system identifier.
`protected XMLDocumentFragmentScannerImpl.ElementStack` | `fElementStack` Deprecated. Element stack.
`protected int[]` | `fEntityStack` Deprecated. Entity stack.
`protected boolean` | `fHasExternalDTD` Deprecated. has external dtd
`protected boolean` | `fInScanContent` Deprecated. SubScanner state: inside scanContent method.
`protected int` | `fMarkupDepth` Deprecated. Markup depth.
`protected boolean` | `fNamespaces` Deprecated. Namespaces.
`protected boolean` | `fNotifyBuiltInRefs` Deprecated. Notify built-in references.
`protected int` | `fScannerState` Deprecated. Scanner state.
`protected boolean` | `fStandalone` Deprecated. Standalone.
`protected static String` | `NAMESPACES` Deprecated. Feature identifier: namespaces.
`protected static String` | `NOTIFY_BUILTIN_REFS` Deprecated. Feature identifier: notify built-in refereces.
`protected static int` | `SCANNER_STATE_CDATA` Deprecated. Scanner state: CDATA section.
`protected static int` | `SCANNER_STATE_COMMENT` Deprecated. Scanner state: comment.
`protected static int` | `SCANNER_STATE_CONTENT` Deprecated. Scanner state: content.
`protected static int` | `SCANNER_STATE_DOCTYPE` Deprecated. Scanner state: DOCTYPE.
`protected static int` | `SCANNER_STATE_END_OF_INPUT` Deprecated. Scanner state: end of input.
`protected static int` | `SCANNER_STATE_PI` Deprecated. Scanner state: processing instruction.
`protected static int` | `SCANNER_STATE_REFERENCE` Deprecated. Scanner state: reference.
`protected static int` | `SCANNER_STATE_ROOT_ELEMENT` Deprecated. Scanner state: root element.
`protected static int` | `SCANNER_STATE_START_OF_MARKUP` Deprecated. Scanner state: start of markup.
`protected static int` | `SCANNER_STATE_TERMINATED` Deprecated. Scanner state: terminated.
`protected static int` | `SCANNER_STATE_TEXT_DECL` Deprecated. Scanner state: Text declaration.

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
`XMLDocumentFragmentScannerImpl()` Deprecated. Default constructor.

Method Summary
`protected XMLDocumentFragmentScannerImpl.Dispatcher` | `createContentDispatcher()` Deprecated. Creates a content dispatcher.
`void` | `endEntity(String name)` Deprecated. This method notifies the end of an entity.
`String` | `getDispatcherName(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)` Deprecated. Returns the dispatcher name.
`XMLDocumentHandler` | `getDocumentHandler()` Deprecated. Returns the document handler
`String[]` | `getRecognizedFeatures()` Deprecated. Returns a list of feature identifiers that are recognized by this component.
`String[]` | `getRecognizedProperties()` Deprecated. Returns a list of property identifiers that are recognized by this component.
`protected String` | `getScannerStateName(int state)` Deprecated. Returns the scanner state name.
`protected int` | `handleEndElement(QName element, boolean isEmpty)` Deprecated. Handles the end element.
`void` | `reset(XMLComponentManager componentManager)` Deprecated. Resets the component.
`protected void` | `scanAttribute(XMLAttributes attributes)` Deprecated. Scans an attribute.
`protected boolean` | `scanCDATASection(boolean complete)` Deprecated. Scans a CDATA section.
`protected void` | `scanCharReference()` Deprecated. Scans a character reference.
`protected void` | `scanComment()` Deprecated. Scans a comment.
`protected int` | `scanContent()` Deprecated. Scans element content.
`boolean` | `scanDocument(boolean complete)` Deprecated. Scans a document.
`protected int` | `scanEndElement()` Deprecated. Scans an end element.
`protected void` | `scanEntityReference()` Deprecated. Scans an entity reference.
`protected void` | `scanPIData(String target, XMLString data)` Deprecated. Scans a processing data.
`protected boolean` | `scanStartElement()` Deprecated. Scans a start element.
`protected void` | `scanXMLDeclOrTextDecl(boolean scanningTextDecl)` Deprecated. Scans an XML or text declaration.
`protected void` | `setDispatcher(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)` Deprecated. Sets the dispatcher.
`void` | `setDocumentHandler(XMLDocumentHandler documentHandler)` Deprecated. setDocumentHandler
`void` | `setFeature(String featureId, boolean state)` Deprecated. Sets the state of a feature.
`void` | `setInputSource(XMLInputSource inputSource)` Deprecated. Sets the input source.
`void` | `setProperty(String propertyId, Object value)` Deprecated. Sets the value of a property.
`protected void` | `setScannerState(int state)` Deprecated. Sets the scanner state.
`void` | `startEntity(String name, XMLResourceIdentifier identifier, String encoding)` Deprecated. This method notifies of the start of an entity.

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_START_OF_MARKUP

    protected static final int SCANNER_STATE_START_OF_MARKUP

  Deprecated.
  Scanner state: start of markup.

  See Also:
    Constant Field Values

### SCANNER_STATE_COMMENT

    protected static final int SCANNER_STATE_COMMENT

  Deprecated.
  Scanner state: comment.

  See Also:
    Constant Field Values

### SCANNER_STATE_PI

    protected static final int SCANNER_STATE_PI

  Deprecated.
  Scanner state: processing instruction.

  See Also:
    Constant Field Values

### SCANNER_STATE_DOCTYPE

    protected static final int SCANNER_STATE_DOCTYPE

  Deprecated.
  Scanner state: DOCTYPE.

  See Also:
    Constant Field Values

### SCANNER_STATE_ROOT_ELEMENT

    protected static final int SCANNER_STATE_ROOT_ELEMENT

  Deprecated.
  Scanner state: root element.

  See Also:
    Constant Field Values

### SCANNER_STATE_CONTENT

    protected static final int SCANNER_STATE_CONTENT

  Deprecated.
  Scanner state: content.

  See Also:
    Constant Field Values

### SCANNER_STATE_REFERENCE

    protected static final int SCANNER_STATE_REFERENCE

  Deprecated.
  Scanner state: reference.

  See Also:
    Constant Field Values

### SCANNER_STATE_END_OF_INPUT

    protected static final int SCANNER_STATE_END_OF_INPUT

  Deprecated.
  Scanner state: end of input.

  See Also:
    Constant Field Values

### SCANNER_STATE_TERMINATED

    protected static final int SCANNER_STATE_TERMINATED

  Deprecated.
  Scanner state: terminated.

  See Also:
    Constant Field Values

### SCANNER_STATE_CDATA

    protected static final int SCANNER_STATE_CDATA

  Deprecated.
  Scanner state: CDATA section.

  See Also:
    Constant Field Values

### SCANNER_STATE_TEXT_DECL

    protected static final int SCANNER_STATE_TEXT_DECL

  Deprecated.
  Scanner state: Text declaration.

  See Also:
    Constant Field Values

### NAMESPACES

    protected static final String NAMESPACES

  Deprecated.
  Feature identifier: namespaces.

  See Also:
    Constant Field Values

### NOTIFY_BUILTIN_REFS

    protected static final String NOTIFY_BUILTIN_REFS

  Deprecated.
  Feature identifier: notify built-in refereces.

  See Also:
    Constant Field Values

### fDocumentHandler

    protected XMLDocumentHandler fDocumentHandler

  Deprecated.
  Document handler.

### fEntityStack

    protected int[] fEntityStack

  Deprecated.
  Entity stack.

### fMarkupDepth

    protected int fMarkupDepth

  Deprecated.
  Markup depth.

### fScannerState

    protected int fScannerState

  Deprecated.
  Scanner state.

### fInScanContent

    protected boolean fInScanContent

  Deprecated.
  SubScanner state: inside scanContent method.

### fHasExternalDTD

    protected boolean fHasExternalDTD

  Deprecated.
  has external dtd

### fStandalone

    protected boolean fStandalone

  Deprecated.
  Standalone.

### fCurrentElement

    protected QName fCurrentElement

  Deprecated.
  Current element.

### fElementStack

    protected XMLDocumentFragmentScannerImpl.ElementStack fElementStack

  Deprecated.
  Element stack.

### fDocumentSystemId

    protected String fDocumentSystemId

  Deprecated.
  Document system identifier.

### fNamespaces

    protected boolean fNamespaces

  Deprecated.
  Namespaces.

### fNotifyBuiltInRefs

    protected boolean fNotifyBuiltInRefs

  Deprecated.
  Notify built-in references.

### fDispatcher

    protected XMLDocumentFragmentScannerImpl.Dispatcher fDispatcher

  Deprecated.
  Active dispatcher.

### fContentDispatcher

    protected XMLDocumentFragmentScannerImpl.Dispatcher fContentDispatcher

  Deprecated.
  Content dispatcher.

Constructor Detail

### XMLDocumentFragmentScannerImpl

    public XMLDocumentFragmentScannerImpl()

  Deprecated.
  Default constructor.

Method Detail

### setInputSource

    public void setInputSource(XMLInputSource inputSource)
                        throws IOException

  Deprecated.
  Sets the input source.

  Specified by:
    `setInputSource` in interface `XMLDocumentScanner`
  Parameters:
    `inputSource` - The input source.
  Throws:
    `IOException` - Thrown on i/o error.

### scanDocument

    public boolean scanDocument(boolean complete)
                         throws IOException,
                                XNIException

  Deprecated.
  Scans a document.

  Specified by:
    `scanDocument` in interface `XMLDocumentScanner`
  Parameters:
    `complete` - True if the scanner should scan the document completely, pushing all events to the registered document handler. A value of false indicates that that the scanner should only scan the next portion of the document and return. A scanner instance is permitted to completely scan a document if it does not support this "pull" scanning model.
  Throws:
    `IOException`
    `XNIException`

### reset

    public void reset(XMLComponentManager componentManager)
               throws XMLConfigurationException

  Deprecated.
  Resets the component. The component can query the component manager about any features and properties that affect the operation of the component.

  Specified by:
    `reset` in interface `XMLComponent`
  Overrides:
    `reset` in class `XMLScanner`
  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.
    `XMLConfigurationException`

### getRecognizedFeatures

    public String[] getRecognizedFeatures()

  Deprecated.
  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.

  Specified by:
    `getRecognizedFeatures` in interface `XMLComponent`

### setFeature

    public void setFeature(String featureId,
                           boolean state)
                    throws XMLConfigurationException

  Deprecated.
  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.

  Specified by:
    `setFeature` in interface `XMLComponent`
  Overrides:
    `setFeature` in class `XMLScanner`
  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.
    `XMLConfigurationException` - Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.

### getRecognizedProperties

    public String[] getRecognizedProperties()

  Deprecated.
  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.

  Specified by:
    `getRecognizedProperties` in interface `XMLComponent`

### setProperty

    public void setProperty(String propertyId,
                            Object value)
                     throws XMLConfigurationException

  Deprecated.
  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.

  Specified by:
    `setProperty` in interface `XMLComponent`
  Overrides:
    `setProperty` in class `XMLScanner`
  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.
    `XMLConfigurationException` - Thrown for configuration error. In general, components should only throw this exception if it is really a critical error.

### setDocumentHandler

    public void setDocumentHandler(XMLDocumentHandler documentHandler)

  Deprecated.
  setDocumentHandler

  Specified by:
    `setDocumentHandler` in interface `XMLDocumentSource`
  Parameters:
    `documentHandler` -

### getDocumentHandler

    public XMLDocumentHandler getDocumentHandler()

  Deprecated.
  Returns the document handler

  Specified by:
    `getDocumentHandler` in interface `XMLDocumentSource`

### startEntity

    public void startEntity(String name,
                            XMLResourceIdentifier identifier,
                            String encoding)
                     throws XNIException

  Deprecated.
  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.

  Specified by:
    `startEntity` in interface `XMLEntityHandler`
  Overrides:
    `startEntity` in class `XMLScanner`
  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.

### endEntity

    public void endEntity(String name)
                   throws XNIException

  Deprecated.
  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.

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

### createContentDispatcher

    protected XMLDocumentFragmentScannerImpl.Dispatcher createContentDispatcher()

  Deprecated.
  Creates a content dispatcher.

### scanXMLDeclOrTextDecl

    protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl)
                                  throws IOException,
                                         XNIException

  Deprecated.
  Scans an XML or text declaration.

       [23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
       [24] VersionInfo ::= S 'version' Eq (' VersionNum ' | " VersionNum ")
       [80] EncodingDecl ::= S 'encoding' Eq ('"' EncName '"' |  "'" EncName "'" )
       [81] EncName ::= [A-Za-z] ([A-Za-z0-9._] | '-')*
       [32] SDDecl ::= S 'standalone' Eq (("'" ('yes' | 'no') "'")
                       | ('"' ('yes' | 'no') '"'))

       [77] TextDecl ::= '<?xml' VersionInfo? EncodingDecl S? '?>'

  Parameters:
    `scanningTextDecl` - True if a text declaration is to be scanned instead of an XML declaration.
  Throws:
    `IOException`
    `XNIException`

### scanPIData

    protected void scanPIData(String target,
                              XMLString data)
                       throws IOException,
                              XNIException

  Deprecated.
  Scans a processing data. This is needed to handle the situation where a document starts with a processing instruction whose target name starts with "xml". (e.g. xmlfoo)

  Overrides:
    `scanPIData` in class `XMLScanner`
  Parameters:
    `target` - The PI target
    `data` - The string to fill in with the data
  Throws:
    `IOException`
    `XNIException`

### scanComment

    protected void scanComment()
                        throws IOException,
                               XNIException

  Deprecated.
  Scans a comment.

       [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'

  Note: Called after scanning past '<!--'

  Throws:
    `IOException`
    `XNIException`

### scanStartElement

    protected boolean scanStartElement()
                                throws IOException,
                                       XNIException

  Deprecated.
  Scans a start element. This method will handle the binding of namespace information and notifying the handler of the start of the element.

       [44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
       [40] STag ::= '<' Name (S Attribute)* S? '>'

  Note: This method assumes that the leading '<' character has been consumed.

  Note: This method uses the fElementQName and fAttributes variables. The contents of these variables will be destroyed. The caller should copy important information out of these variables before calling this method.

  Throws:
    `IOException`
    `XNIException`

### scanAttribute

    protected void scanAttribute(XMLAttributes attributes)
                          throws IOException,
                                 XNIException

  Deprecated.
  Scans an attribute.

       [41] Attribute ::= Name Eq AttValue

  Note: This method assumes that the next character on the stream is the first character of the attribute name.

  Note: This method uses the fAttributeQName and fQName variables. The contents of these variables will be destroyed.

  Parameters:
    `attributes` - The attributes list for the scanned attribute.
  Throws:
    `IOException`
    `XNIException`

### scanContent

    protected int scanContent()
                       throws IOException,
                              XNIException

  Deprecated.
  Scans element content.

  Throws:
    `IOException`
    `XNIException`

### scanCDATASection

    protected boolean scanCDATASection(boolean complete)
                                throws IOException,
                                       XNIException

  Deprecated.
  Scans a CDATA section.

  Note: This method uses the fString and fStringBuffer variables.

  Parameters:
    `complete` - True if the CDATA section is to be scanned completely.
  Returns:
    True if CDATA is completely scanned.
  Throws:
    `IOException`
    `XNIException`

### scanEndElement

    protected int scanEndElement()
                          throws IOException,
                                 XNIException

  Deprecated.
  Scans an end element.

       [42] ETag ::= '</' Name S? '>'

  Note: This method uses the fElementQName variable. The contents of this variable will be destroyed. The caller should copy the needed information out of this variable before calling this method.

  Throws:
    `IOException`
    `XNIException`

### scanCharReference

    protected void scanCharReference()
                              throws IOException,
                                     XNIException

  Deprecated.
  Scans a character reference.

       [66] CharRef ::= '&#' [0-9]+ ';' | '&#x' [0-9a-fA-F]+ ';'

  Throws:
    `IOException`
    `XNIException`

### scanEntityReference

    protected void scanEntityReference()
                                throws IOException,
                                       XNIException

  Deprecated.
  Scans an entity reference.

  Throws:
    `IOException` - Thrown if i/o error occurs.
    `XNIException` - Thrown if handler throws exception upon notification.

### handleEndElement

    protected int handleEndElement(QName element,
                                   boolean isEmpty)
                            throws XNIException

  Deprecated.
  Handles the end element. This method will make sure that the end element name matches the current element and notify the handler about the end of the element and the end of any relevent prefix mappings.

  Note: This method uses the fQName variable. The contents of this variable will be destroyed.

  Parameters:
    `element` - The element.
  Throws:
    `XNIException` - Thrown if the handler throws a SAX exception upon notification.

### setScannerState

    protected final void setScannerState(int state)

  Deprecated.
  Sets the scanner state.

  Parameters:
    `state` - The new scanner state.

### setDispatcher

    protected final void setDispatcher(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)

  Deprecated.
  Sets the dispatcher.

  Parameters:
    `dispatcher` - The new dispatcher.

### getScannerStateName

    protected String getScannerStateName(int state)

  Deprecated.
  Returns the scanner state name.

### getDispatcherName

    public String getDispatcherName(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)

  Deprecated.
  Returns the dispatcher name.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| Documentation is available at http://e-docs.bea.com/wls/docs92 Copyright 2006 BEA Systems Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD