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

## BEA WebLogic Server 9.0 API Reference

## weblogic.apache.xerces.impl
Class XMLDTDScannerImpl

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

All Implemented Interfaces:
  XMLComponent, XMLDTDContentModelSource, XMLDTDScanner, XMLDTDSource, XMLEntityHandler

Direct Known Subclasses:
  XML11DTDScannerImpl

Deprecated. please use JDK supplied XML parsers and transformers

public class XMLDTDScannerImpl
extends XMLScanner
implements XMLDTDScanner, XMLComponent, XMLEntityHandler

This class is responsible for scanning the declarations found in the internal and external subsets of a DTD in an XML document. The scanner acts as the sources for the DTD information which is communicated to the DTD handlers.

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

- http://xml.org/sax/features/validation
- http://apache.org/xml/features/scanner/notify-char-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

Field Summary
`protected XMLDTDContentModelHandler` | `fDTDContentModelHandler` Deprecated. DTD content model handler.
`protected XMLDTDHandler` | `fDTDHandler` Deprecated. DTD handler.
`protected int` | `fScannerState` Deprecated. Scanner state.
`protected boolean` | `fSeenExternalDTD` Deprecated. Seen external DTD.
`protected boolean` | `fSeenExternalPE` Deprecated. Seen external parameter entity.
`protected boolean` | `fStandalone` Deprecated. Standalone.
`protected static int` | `SCANNER_STATE_END_OF_INPUT` Deprecated. Scanner state: end of input.
`protected static int` | `SCANNER_STATE_MARKUP_DECL` Deprecated. Scanner state: markup declaration.
`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
`XMLDTDScannerImpl()` Deprecated. Default constructor.
`XMLDTDScannerImpl(SymbolTable symbolTable, XMLErrorReporter errorReporter, XMLEntityManager entityManager)` Deprecated. Constructor for he use of non-XMLComponentManagers.

Method Summary
`void` | `endEntity(String name)` Deprecated. This method notifies the end of an entity.
`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.
`void` | `reset()` Deprecated.
`void` | `reset(XMLComponentManager componentManager)` Deprecated. reset
`protected String` | `scanAttDefaultDecl(String elName, String atName, String type, XMLString defaultVal, XMLString nonNormalizedDefaultVal)` Deprecated. Scans an attribute default declaration
`protected void` | `scanAttlistDecl()` Deprecated. Scans an attlist declaration
`protected void` | `scanComment()` Deprecated. Scans a comment.
`protected boolean` | `scanDecls(boolean complete)` Deprecated. Dispatch an XML "event".
`boolean` | `scanDTDExternalSubset(boolean complete)` Deprecated. Scans the external subset of the document.
`boolean` | `scanDTDInternalSubset(boolean complete, boolean standalone, boolean hasExternalSubset)` Deprecated. Scans the internal subset of the document.
`protected void` | `scanElementDecl()` Deprecated. Scans an element declaration
`protected void` | `scanEntityValue(XMLString value, XMLString nonNormalizedValue)` Deprecated. Scans an entity value.
`protected boolean` | `scanningInternalSubset()` Deprecated.
`protected void` | `scanPIData(String target, XMLString data)` Deprecated. Scans a processing data.
`protected boolean` | `scanTextDecl()` Deprecated. Dispatch an XML "event".
`void` | `setDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler)` Deprecated. setDTDContentModelHandler
`void` | `setDTDHandler(XMLDTDHandler dtdHandler)` Deprecated. setDTDHandler
`void` | `setInputSource(XMLInputSource inputSource)` Deprecated. Sets the input source.
`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.
`protected void` | `startPE(String name, boolean literal)` Deprecated. start a parameter entity dealing with the textdecl if there is any

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

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

Methods inherited from interface weblogic.apache.xerces.xni.parser.XMLComponent
`setFeature, setProperty`

Field Detail

### fDTDContentModelHandler

    protected XMLDTDContentModelHandler fDTDContentModelHandler

  Deprecated.
  DTD content model handler.

### fDTDHandler

    protected XMLDTDHandler fDTDHandler

  Deprecated.
  DTD handler.

### fScannerState

    protected int fScannerState

  Deprecated.
  Scanner state.

### fSeenExternalDTD

    protected boolean fSeenExternalDTD

  Deprecated.
  Seen external DTD.

### fSeenExternalPE

    protected boolean fSeenExternalPE

  Deprecated.
  Seen external parameter entity.

### fStandalone

    protected boolean fStandalone

  Deprecated.
  Standalone.

### 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_MARKUP_DECL

    protected static final int SCANNER_STATE_MARKUP_DECL

  Deprecated.
  Scanner state: markup declaration.

  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

Constructor Detail

### XMLDTDScannerImpl

    public XMLDTDScannerImpl()

  Deprecated.
  Default constructor.

### XMLDTDScannerImpl

    public XMLDTDScannerImpl(SymbolTable symbolTable,
                             XMLErrorReporter errorReporter,
                             XMLEntityManager entityManager)

  Deprecated.
  Constructor for he use of non-XMLComponentManagers.

Method Detail

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

### 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`

### 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`

### reset

    public void reset()

  Deprecated.
  Overrides:
    `reset` in class `XMLScanner`

### reset

    public void reset(XMLComponentManager componentManager)
               throws XMLConfigurationException

  Deprecated.
  reset

  Specified by:
    `reset` in interface `XMLComponent`
  Overrides:
    `reset` in class `XMLScanner`
  Parameters:
    `componentManager` -
  Throws:
    `XMLConfigurationException`

### scanAttDefaultDecl

    protected final String scanAttDefaultDecl(String elName,
                                              String atName,
                                              String type,
                                              XMLString defaultVal,
                                              XMLString nonNormalizedDefaultVal)
                                       throws IOException,
                                              XNIException

  Deprecated.
  Scans an attribute default declaration

       [60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)

  Parameters:
    `defaultVal` - The string to fill in with the default value.
  Throws:
    `IOException`
    `XNIException`

### scanAttlistDecl

    protected final void scanAttlistDecl()
                                  throws IOException,
                                         XNIException

  Deprecated.
  Scans an attlist declaration

       [52]  AttlistDecl    ::=   '<!ATTLIST' S Name AttDef* S? '>'
       [53]  AttDef         ::=   S Name S AttType S DefaultDecl

  Note: Called after scanning past '<!ATTLIST'

  Throws:
    `IOException`
    `XNIException`

### scanComment

    protected final void scanComment()
                              throws IOException,
                                     XNIException

  Deprecated.
  Scans a comment.

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

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

  Throws:
    `IOException`
    `XNIException`

### scanDecls

    protected final boolean scanDecls(boolean complete)
                               throws IOException,
                                      XNIException

  Deprecated.
  Dispatch an XML "event".

  Parameters:
    `complete` - True if this method is intended to scan and dispatch as much as possible.
  Throws:
    `IOException` - Thrown on i/o error.
    `XNIException` - Thrown on parse error.

### scanDTDExternalSubset

    public boolean scanDTDExternalSubset(boolean complete)
                                  throws IOException,
                                         XNIException

  Deprecated.
  Scans the external subset of the document.

  Specified by:
    `scanDTDExternalSubset` in interface `XMLDTDScanner`
  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`

### scanDTDInternalSubset

    public boolean scanDTDInternalSubset(boolean complete,
                                         boolean standalone,
                                         boolean hasExternalSubset)
                                  throws IOException,
                                         XNIException

  Deprecated.
  Scans the internal subset of the document.

  Specified by:
    `scanDTDInternalSubset` in interface `XMLDTDScanner`
  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.
    `standalone` - True if the document was specified as standalone. This value is important for verifying certain well-formedness constraints.
  Throws:
    `IOException`
    `XNIException`

### scanElementDecl

    protected final void scanElementDecl()
                                  throws IOException,
                                         XNIException

  Deprecated.
  Scans an element declaration

       [45]    elementdecl    ::=    '<!ELEMENT' S Name S contentspec S? '>'
       [46]    contentspec    ::=    'EMPTY' | 'ANY' | Mixed | children

  Note: Called after scanning past '<!ELEMENT'

  Throws:
    `IOException`
    `XNIException`

### scanEntityValue

    protected final void scanEntityValue(XMLString value,
                                         XMLString nonNormalizedValue)
                                  throws IOException,
                                         XNIException

  Deprecated.
  Scans an entity value.

  Parameters:
    `value` - The string to fill in with the value.
    `nonNormalizedValue` - The string to fill in with the non-normalized value. Note: This method uses fString, fStringBuffer (through the use of scanCharReferenceValue), and fStringBuffer2, anything in them at the time of calling is lost.
  Throws:
    `IOException`
    `XNIException`

### scanningInternalSubset

    protected final boolean scanningInternalSubset()

  Deprecated.

### scanPIData

    protected final 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`

### scanTextDecl

    protected final boolean scanTextDecl()
                                  throws IOException,
                                         XNIException

  Deprecated.
  Dispatch an XML "event".

  Throws:
    `IOException` - Thrown on i/o error.
    `XNIException` - Thrown on parse error.

### setDTDContentModelHandler

    public void setDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler)

  Deprecated.
  setDTDContentModelHandler

  Specified by:
    `setDTDContentModelHandler` in interface `XMLDTDContentModelSource`
  Parameters:
    `dtdContentModelHandler` -

### setDTDHandler

    public void setDTDHandler(XMLDTDHandler dtdHandler)

  Deprecated.
  setDTDHandler

  Specified by:
    `setDTDHandler` in interface `XMLDTDSource`
  Parameters:
    `dtdHandler` -

### setInputSource

    public void setInputSource(XMLInputSource inputSource)
                        throws IOException

  Deprecated.
  Sets the input source.

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

### setScannerState

    protected final void setScannerState(int state)

  Deprecated.
  Sets the scanner state.

  Parameters:
    `state` - The new scanner state.

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

### startPE

    protected void startPE(String name,
                           boolean literal)
                    throws IOException,
                           XNIException

  Deprecated.
  start a parameter entity dealing with the textdecl if there is any

  Parameters:
    `name` - The name of the parameter entity to start (without the '%')
    `literal` - Whether this is happening within a literal
  Throws:
    `IOException`
    `XNIException`

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