| 
 | BEA Systems, Inc. | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object
  |
  +--weblogic.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:
| Inner Class Summary | |
| protected static interface | XMLDocumentFragmentScannerImpl.DispatcherThis interface defines an XML "event" dispatching model. | 
| protected static class | XMLDocumentFragmentScannerImpl.ElementStackElement stack. | 
| protected  class | XMLDocumentFragmentScannerImpl.FragmentContentDispatcherDispatcher to handle content scanning. | 
| Field Summary | |
| protected  XMLDocumentFragmentScannerImpl.Dispatcher | fContentDispatcherContent dispatcher. | 
| protected  QName | fCurrentElementCurrent element. | 
| protected  XMLDocumentFragmentScannerImpl.Dispatcher | fDispatcherActive dispatcher. | 
| protected  XMLDocumentHandler | fDocumentHandlerDocument handler. | 
| protected  java.lang.String | fDocumentSystemIdDocument system identifier. | 
| protected  XMLDocumentFragmentScannerImpl.ElementStack | fElementStackElement stack. | 
| protected  int[] | fEntityStackEntity stack. | 
| protected  boolean | fHasExternalDTDhas external dtd | 
| protected  boolean | fInScanContentSubScanner state: inside scanContent method. | 
| protected  int | fMarkupDepthMarkup depth. | 
| protected  boolean | fNamespacesNamespaces. | 
| protected  boolean | fNotifyBuiltInRefsNotify built-in references. | 
| protected  int | fScannerStateScanner state. | 
| protected  boolean | fStandaloneStandalone. | 
| protected static java.lang.String | NAMESPACESFeature identifier: namespaces. | 
| protected static java.lang.String | NOTIFY_BUILTIN_REFSFeature identifier: notify built-in refereces. | 
| protected static int | SCANNER_STATE_CDATAScanner state: CDATA section. | 
| protected static int | SCANNER_STATE_COMMENTScanner state: comment. | 
| protected static int | SCANNER_STATE_CONTENTScanner state: content. | 
| protected static int | SCANNER_STATE_DOCTYPEScanner state: DOCTYPE. | 
| protected static int | SCANNER_STATE_END_OF_INPUTScanner state: end of input. | 
| protected static int | SCANNER_STATE_PIScanner state: processing instruction. | 
| protected static int | SCANNER_STATE_REFERENCEScanner state: reference. | 
| protected static int | SCANNER_STATE_ROOT_ELEMENTScanner state: root element. | 
| protected static int | SCANNER_STATE_START_OF_MARKUPScanner state: start of markup. | 
| protected static int | SCANNER_STATE_TERMINATEDScanner state: terminated. | 
| protected static int | SCANNER_STATE_TEXT_DECLScanner 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()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 | getDispatcherName(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)Returns the dispatcher name. | 
|  XMLDocumentHandler | getDocumentHandler()Returns the document handler | 
|  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. | 
| protected  int | handleEndElement(QName element,
                 boolean isEmpty)Handles the end element. | 
|  void | reset(XMLComponentManager componentManager)Resets the component. | 
| protected  void | scanAttribute(XMLAttributes attributes)Scans an attribute. | 
| protected  boolean | scanCDATASection(boolean complete)Scans a CDATA section. | 
| protected  void | scanCharReference()Scans a character reference. | 
| protected  void | scanComment()Scans a comment. | 
| protected  int | scanContent()Scans element content. | 
|  boolean | scanDocument(boolean complete)Scans a document. | 
| protected  int | scanEndElement()Scans an end element. | 
| protected  void | scanEntityReference()Scans an entity reference. | 
| protected  void | scanPIData(java.lang.String target,
           XMLString data)Scans a processing data. | 
| protected  boolean | scanStartElement()Scans a start element. | 
| protected  void | scanXMLDeclOrTextDecl(boolean scanningTextDecl)Scans an XML or text declaration. | 
| protected  void | setDispatcher(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)Sets the dispatcher. | 
|  void | setDocumentHandler(XMLDocumentHandler documentHandler)setDocumentHandler | 
|  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. | 
| protected  void | setScannerState(int state)Sets the scanner state. | 
|  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.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 static final int SCANNER_STATE_START_OF_MARKUP
protected static final int SCANNER_STATE_COMMENT
protected static final int SCANNER_STATE_PI
protected static final int SCANNER_STATE_DOCTYPE
protected static final int SCANNER_STATE_ROOT_ELEMENT
protected static final int SCANNER_STATE_CONTENT
protected static final int SCANNER_STATE_REFERENCE
protected static final int SCANNER_STATE_END_OF_INPUT
protected static final int SCANNER_STATE_TERMINATED
protected static final int SCANNER_STATE_CDATA
protected static final int SCANNER_STATE_TEXT_DECL
protected static final java.lang.String NAMESPACES
protected static final java.lang.String NOTIFY_BUILTIN_REFS
protected XMLDocumentHandler fDocumentHandler
protected int[] fEntityStack
protected int fMarkupDepth
protected int fScannerState
protected boolean fInScanContent
protected boolean fHasExternalDTD
protected boolean fStandalone
protected QName fCurrentElement
protected XMLDocumentFragmentScannerImpl.ElementStack fElementStack
protected java.lang.String fDocumentSystemId
protected boolean fNamespaces
protected boolean fNotifyBuiltInRefs
protected XMLDocumentFragmentScannerImpl.Dispatcher fDispatcher
protected XMLDocumentFragmentScannerImpl.Dispatcher fContentDispatcher
| Constructor Detail | 
public XMLDocumentFragmentScannerImpl()
| Method Detail | 
public void setInputSource(XMLInputSource inputSource)
                    throws java.io.IOException
inputSource - The input source.
public boolean scanDocument(boolean complete)
                     throws java.io.IOException,
                            XNIException
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.
public void reset(XMLComponentManager componentManager)
           throws XMLConfigurationException
componentManager - The component manager.public java.lang.String[] getRecognizedFeatures()
public void setFeature(java.lang.String featureId,
                       boolean state)
                throws XMLConfigurationException
Note: Components should silently ignore features that do not affect the operation of the component.
featureId - The feature identifier.state - The state of the feature.public java.lang.String[] getRecognizedProperties()
public void setProperty(java.lang.String propertyId,
                        java.lang.Object value)
                 throws XMLConfigurationException
Note: Components should silently ignore properties that do not affect the operation of the component.
propertyId - The property identifier.value - The value of the property.public void setDocumentHandler(XMLDocumentHandler documentHandler)
documentHandler -  public XMLDocumentHandler getDocumentHandler()
public void startEntity(java.lang.String name,
                        XMLResourceIdentifier identifier,
                        java.lang.String encoding)
                 throws XNIException
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).
public void endEntity(java.lang.String name)
               throws XNIException
name - The name of the entity.protected XMLDocumentFragmentScannerImpl.Dispatcher createContentDispatcher()
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl)
                              throws java.io.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.
protected void scanPIData(java.lang.String target,
                          XMLString data)
                   throws java.io.IOException,
                          XNIException
target - The PI targetdata - The string to fill in with the data
protected void scanComment()
                    throws java.io.IOException,
                           XNIException
 [15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
 
 Note: Called after scanning past '<!--'
protected boolean scanStartElement()
                            throws java.io.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.
protected void scanAttribute(XMLAttributes attributes)
                      throws java.io.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.
protected int scanContent()
                   throws java.io.IOException,
                          XNIException
protected boolean scanCDATASection(boolean complete)
                            throws java.io.IOException,
                                   XNIException
Note: This method uses the fString and fStringBuffer variables.
complete - True if the CDATA section is to be scanned
                 completely.
protected int scanEndElement()
                      throws java.io.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.
protected void scanCharReference()
                          throws java.io.IOException,
                                 XNIException
[66] CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';'
protected void scanEntityReference()
                            throws java.io.IOException,
                                   XNIException
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.protected final void setScannerState(int state)
state - The new scanner state.protected final void setDispatcher(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)
dispatcher - The new dispatcher.protected java.lang.String getScannerStateName(int state)
public java.lang.String getDispatcherName(XMLDocumentFragmentScannerImpl.Dispatcher dispatcher)
| 
 | Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs81 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||