| 
 | BEA Systems, Inc. | |||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Objectweblogic.apache.xerces.impl.XMLScanner
weblogic.apache.xerces.impl.XMLDocumentFragmentScannerImpl
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:
| Nested Class Summary | |
| protected static interface | XMLDocumentFragmentScannerImpl.DispatcherDeprecated. This interface defines an XML "event" dispatching model. | 
| protected static class | XMLDocumentFragmentScannerImpl.ElementStackDeprecated. Element stack. | 
| protected  class | XMLDocumentFragmentScannerImpl.FragmentContentDispatcherDeprecated. Dispatcher to handle content scanning. | 
| Field Summary | |
| protected  XMLDocumentFragmentScannerImpl.Dispatcher | fContentDispatcherDeprecated. Content dispatcher. | 
| protected  QName | fCurrentElementDeprecated. Current element. | 
| protected  XMLDocumentFragmentScannerImpl.Dispatcher | fDispatcherDeprecated. Active dispatcher. | 
| protected  XMLDocumentHandler | fDocumentHandlerDeprecated. Document handler. | 
| protected  String | fDocumentSystemIdDeprecated. Document system identifier. | 
| protected  XMLDocumentFragmentScannerImpl.ElementStack | fElementStackDeprecated. Element stack. | 
| protected  int[] | fEntityStackDeprecated. Entity stack. | 
| protected  boolean | fHasExternalDTDDeprecated. has external dtd | 
| protected  boolean | fInScanContentDeprecated. SubScanner state: inside scanContent method. | 
| protected  int | fMarkupDepthDeprecated. Markup depth. | 
| protected  boolean | fNamespacesDeprecated. Namespaces. | 
| protected  boolean | fNotifyBuiltInRefsDeprecated. Notify built-in references. | 
| protected  int | fScannerStateDeprecated. Scanner state. | 
| protected  boolean | fStandaloneDeprecated. Standalone. | 
| protected static String | NAMESPACESDeprecated. Feature identifier: namespaces. | 
| protected static String | NOTIFY_BUILTIN_REFSDeprecated. Feature identifier: notify built-in refereces. | 
| protected static int | SCANNER_STATE_CDATADeprecated. Scanner state: CDATA section. | 
| protected static int | SCANNER_STATE_COMMENTDeprecated. Scanner state: comment. | 
| protected static int | SCANNER_STATE_CONTENTDeprecated. Scanner state: content. | 
| protected static int | SCANNER_STATE_DOCTYPEDeprecated. Scanner state: DOCTYPE. | 
| protected static int | SCANNER_STATE_END_OF_INPUTDeprecated. Scanner state: end of input. | 
| protected static int | SCANNER_STATE_PIDeprecated. Scanner state: processing instruction. | 
| protected static int | SCANNER_STATE_REFERENCEDeprecated. Scanner state: reference. | 
| protected static int | SCANNER_STATE_ROOT_ELEMENTDeprecated. Scanner state: root element. | 
| protected static int | SCANNER_STATE_START_OF_MARKUPDeprecated. Scanner state: start of markup. | 
| protected static int | SCANNER_STATE_TERMINATEDDeprecated. Scanner state: terminated. | 
| protected static int | SCANNER_STATE_TEXT_DECLDeprecated. 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 | 
protected XMLDocumentFragmentScannerImpl.Dispatcher fContentDispatcher
protected QName fCurrentElement
protected XMLDocumentFragmentScannerImpl.Dispatcher fDispatcher
protected XMLDocumentHandler fDocumentHandler
protected String fDocumentSystemId
protected XMLDocumentFragmentScannerImpl.ElementStack fElementStack
protected int[] fEntityStack
protected boolean fHasExternalDTD
protected boolean fInScanContent
protected int fMarkupDepth
protected boolean fNamespaces
protected boolean fNotifyBuiltInRefs
protected int fScannerState
protected boolean fStandalone
protected static final String NAMESPACES
protected static final String NOTIFY_BUILTIN_REFS
protected static final int SCANNER_STATE_CDATA
protected static final int SCANNER_STATE_COMMENT
protected static final int SCANNER_STATE_CONTENT
protected static final int SCANNER_STATE_DOCTYPE
protected static final int SCANNER_STATE_END_OF_INPUT
protected static final int SCANNER_STATE_PI
protected static final int SCANNER_STATE_REFERENCE
protected static final int SCANNER_STATE_ROOT_ELEMENT
protected static final int SCANNER_STATE_START_OF_MARKUP
protected static final int SCANNER_STATE_TERMINATED
protected static final int SCANNER_STATE_TEXT_DECL
| Constructor Detail | 
public XMLDocumentFragmentScannerImpl()
| Method Detail | 
protected XMLDocumentFragmentScannerImpl.Dispatcher createContentDispatcher()
public void endEntity(String name)
               throws XNIException
endEntity in interface XMLEntityHandlerendEntity in class XMLScannername - The name of the entity.
XNIException - Thrown by handler to signal an error.public String getDispatcherName(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)
public XMLDocumentHandler getDocumentHandler()
getDocumentHandler in interface XMLDocumentSourcepublic String[] getRecognizedFeatures()
getRecognizedFeatures in interface XMLComponentpublic String[] getRecognizedProperties()
getRecognizedProperties in interface XMLComponentprotected String getScannerStateName(int state)
protected int handleEndElement(QName element,
                               boolean isEmpty)
                        throws XNIException
Note: This method uses the fQName variable. The contents of this variable will be destroyed.
element - The element.
XNIException - Thrown if the handler throws a SAX exception
                      upon notification.
public void reset(XMLComponentManager componentManager)
           throws XMLConfigurationException
reset in interface XMLComponentreset in class XMLScannercomponentManager - 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
protected void scanAttribute(XMLAttributes attributes)
                      throws IOException,
                             XNIException
[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.
attributes - The attributes list for the scanned attribute.
IOException
XNIException
protected boolean scanCDATASection(boolean complete)
                            throws IOException,
                                   XNIException
Note: This method uses the fString and fStringBuffer variables.
complete - True if the CDATA section is to be scanned
                 completely.
IOException
XNIException
protected void scanCharReference()
                          throws IOException,
                                 XNIException
[66] CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';'
IOException
XNIException
protected void scanComment()
                    throws IOException,
                           XNIException
 [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
 
 Note: Called after scanning past '<!--'
IOException
XNIException
protected int scanContent()
                   throws IOException,
                          XNIException
IOException
XNIException
public boolean scanDocument(boolean complete)
                     throws IOException,
                            XNIException
scanDocument in interface XMLDocumentScannercomplete - 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.
IOException
XNIException
protected int scanEndElement()
                      throws IOException,
                             XNIException
[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.
IOException
XNIException
protected void scanEntityReference()
                            throws IOException,
                                   XNIException
IOException - Thrown if i/o error occurs.
XNIException - Thrown if handler throws exception upon
                      notification.
protected void scanPIData(String target,
                          XMLString data)
                   throws IOException,
                          XNIException
scanPIData in class XMLScannertarget - The PI targetdata - The string to fill in with the data
IOException
XNIException
protected boolean scanStartElement()
                            throws IOException,
                                   XNIException
[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.
IOException
XNIException
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl)
                              throws IOException,
                                     XNIException
 [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? '?>'
 
scanningTextDecl - True if a text declaration is to
                         be scanned instead of an XML
                         declaration.
IOException
XNIExceptionprotected final void setDispatcher(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)
dispatcher - The new dispatcher.public void setDocumentHandler(XMLDocumentHandler documentHandler)
setDocumentHandler in interface XMLDocumentSourcedocumentHandler - 
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 XMLComponentsetFeature in class XMLScannerfeatureId - 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
public void setInputSource(XMLInputSource inputSource)
                    throws IOException
setInputSource in interface XMLDocumentScannerinputSource - The input source.
IOException - Thrown on i/o error.
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 XMLComponentsetProperty in class XMLScannerpropertyId - 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.
XMLConfigurationExceptionprotected final void setScannerState(int state)
state - The new scanner state.
public void startEntity(String name,
                        XMLResourceIdentifier identifier,
                        String encoding)
                 throws XNIException
startEntity in interface XMLEntityHandlerstartEntity in class XMLScannername - 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).
XNIException - Thrown by handler to signal an error.| 
 | Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs91 Copyright 2005 BEA Systems Inc. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||