Save This Page
Home » openjdk-7 » com.sun.org.apache.xerces.internal » impl » [javadoc | source]
com.sun.org.apache.xerces.internal.impl
public class: XMLDocumentScannerImpl [javadoc | source]
java.lang.Object
   com.sun.org.apache.xerces.internal.impl.XMLScanner
      com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl
         com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl

All Implemented Interfaces:
    XMLComponent, XMLEntityHandler, XMLBufferListener, XMLDocumentScanner

Direct Known Subclasses:
    XML11NSDocumentScannerImpl, XMLNSDocumentScannerImpl, XML11DocumentScannerImpl

This class is responsible for scanning XML document structure and content. This class has been modified as per the new design which is more suited to efficiently build pull parser. Lot of improvements have been done and the code has been added to support stax functionality/features.
Nested Class Summary:
protected final class  XMLDocumentScannerImpl.XMLDeclDriver  Driver to handle XMLDecl scanning. This class has been modified as per the new design which is more suited to efficiently build pull parser. Lots of performance improvements have been done and the code has been added to support stax functionality/features. 
protected final class  XMLDocumentScannerImpl.PrologDriver  Driver to handle prolog scanning. 
protected final class  XMLDocumentScannerImpl.DTDDriver  Driver to handle the internal and external DTD subsets. 
protected class  XMLDocumentScannerImpl.ContentDriver  Driver to handle content scanning. 
protected final class  XMLDocumentScannerImpl.TrailingMiscDriver  Driver to handle trailing miscellaneous section scanning. 
Field Summary
protected static final  int SCANNER_STATE_XML_DECL    Scanner state: XML declaration. 
protected static final  int SCANNER_STATE_PROLOG    Scanner state: prolog. 
protected static final  int SCANNER_STATE_TRAILING_MISC    Scanner state: trailing misc. 
protected static final  int SCANNER_STATE_DTD_INTERNAL_DECLS    Scanner state: DTD internal declarations. 
protected static final  int SCANNER_STATE_DTD_EXTERNAL    Scanner state: open DTD external subset. 
protected static final  int SCANNER_STATE_DTD_EXTERNAL_DECLS    Scanner state: DTD external declarations. 
protected static final  int SCANNER_STATE_NO_SUCH_ELEMENT_EXCEPTION    Scanner state: NO MORE ELEMENTS. 
protected static final  String DOCUMENT_SCANNER    Property identifier document scanner: 
protected static final  String LOAD_EXTERNAL_DTD    Feature identifier: load external DTD. 
protected static final  String DISALLOW_DOCTYPE_DECL_FEATURE    Feature identifier: load external DTD. 
protected static final  String DTD_SCANNER    Property identifier: DTD scanner. 
protected static final  String VALIDATION_MANAGER     
protected static final  String NAMESPACE_CONTEXT    property identifier: NamespaceContext 
protected  XMLDTDScanner fDTDScanner    DTD scanner. 
protected  ValidationManager fValidationManager    Validation manager . 
protected  XMLStringBuffer fDTDDecl     
protected  boolean fReadingDTD     
protected  boolean fAddedListener     
protected  String fDoctypeName    Doctype name. 
protected  String fDoctypePublicId    Doctype declaration public identifier. 
protected  String fDoctypeSystemId    Doctype declaration system identifier. 
protected  NamespaceContext fNamespaceContext    Namespace support. 
protected  boolean fLoadExternalDTD    Load external DTD. 
protected  boolean fDisallowDoctype    Disallow doctype declaration. 
protected  boolean fSeenDoctypeDecl    Seen doctype declaration. 
protected  boolean fScanEndElement     
protected  Driver fXMLDeclDriver    XML declaration driver. 
protected  Driver fPrologDriver    Prolog driver. 
protected  Driver fDTDDriver    DTD driver. 
protected  Driver fTrailingMiscDriver    Trailing miscellaneous section driver. 
protected  int fStartPos     
protected  int fEndPos     
protected  boolean fSeenInternalSubset     
public static final  char[] DOCTYPE     
public static final  char[] COMMENTSTRING     
Fields inherited from com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl:
fElementAttributeLimit,  fExternalSubsetResolver,  SCANNER_STATE_START_OF_MARKUP,  SCANNER_STATE_CONTENT,  SCANNER_STATE_PI,  SCANNER_STATE_DOCTYPE,  SCANNER_STATE_XML_DECL,  SCANNER_STATE_ROOT_ELEMENT,  SCANNER_STATE_COMMENT,  SCANNER_STATE_REFERENCE,  SCANNER_STATE_ATTRIBUTE,  SCANNER_STATE_ATTRIBUTE_VALUE,  SCANNER_STATE_END_OF_INPUT,  SCANNER_STATE_TERMINATED,  SCANNER_STATE_CDATA,  SCANNER_STATE_TEXT_DECL,  SCANNER_STATE_CHARACTER_DATA,  SCANNER_STATE_START_ELEMENT_TAG,  SCANNER_STATE_END_ELEMENT_TAG,  SCANNER_STATE_CHAR_REFERENCE,  SCANNER_STATE_BUILT_IN_REFS,  NOTIFY_BUILTIN_REFS,  ENTITY_RESOLVER,  cdata,  xmlDecl,  endTag,  DEBUG_START_END_ELEMENT,  DEBUG_NEXT,  DEBUG,  DEBUG_COALESCE,  fDocumentHandler,  fScannerLastState,  fEntityStore,  fEntityStack,  fMarkupDepth,  fEmptyElement,  fReadingAttributes,  fScannerState,  fInScanContent,  fLastSectionWasCData,  fLastSectionWasEntityReference,  fLastSectionWasCharacterData,  fHasExternalDTD,  fStandalone,  fVersion,  fCurrentElement,  fElementStack,  fElementStack2,  fPITarget,  fPIData,  fNotifyBuiltInRefs,  fReplaceEntityReferences,  fSupportExternalEntities,  fReportCdataEvent,  fIsCoalesce,  fDeclaredEncoding,  fDriver,  fContentDriver,  fElementQName,  fAttributeQName,  fAttributes,  fTempString,  fTempString2,  fStringBuffer,  fStringBuffer2,  fContentBuffer,  fScanToEnd,  dtdGrammarUtil,  fAddDefaultAttr,  foundBuiltInRefs,  fSecurityManager,  MAX_DEPTH_LIMIT,  ELEMENT_ARRAY_LENGTH,  MAX_POINTER_AT_A_DEPTH,  DEBUG_SKIP_ALGORITHM,  fElementArray,  fLastPointerLocation,  fElementPointer,  fPointerInfo,  fElementRawname,  fShouldSkip,  fAdd,  fSkip,  fUsebuffer
Fields inherited from com.sun.org.apache.xerces.internal.impl.XMLScanner:
NAMESPACES,  VALIDATION,  NOTIFY_CHAR_REFS,  PARSER_SETTINGS,  SYMBOL_TABLE,  ERROR_REPORTER,  ENTITY_MANAGER,  DEBUG_ATTR_NORMALIZATION,  attributeValueCache,  stringBufferCache,  fStringBufferIndex,  fAttributeCacheInitDone,  fAttributeCacheUsedCount,  fValidation,  fNamespaces,  fNotifyCharRefs,  fParserSettings,  fPropertyManager,  fSymbolTable,  fErrorReporter,  fEntityManager,  fEntityStore,  fEvent,  fEntityScanner,  fEntityDepth,  fCharRefLiteral,  fScanningAttribute,  fReportEntity,  fVersionSymbol,  fEncodingSymbol,  fStandaloneSymbol,  fAmpSymbol,  fLtSymbol,  fGtSymbol,  fQuotSymbol,  fAposSymbol,  fResourceIdentifier,  initialCacheCount
Constructor:
 public XMLDocumentScannerImpl() 
Method from com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl Summary:
createContentDriver,   endEntity,   getCharacterEncodingScheme,   getDTDDecl,   getFeatureDefault,   getNamespaceContext,   getPropertyDefault,   getRecognizedFeatures,   getRecognizedProperties,   getScannerStateName,   getScannetState,   next,   refresh,   reset,   reset,   scanDoctypeDecl,   setFeature,   setInputSource,   setProperty,   startEntity
Methods from com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl:
addElement,   canStore,   createContentDriver,   endEntity,   getAttributeIterator,   getCharacterData,   getComment,   getDocumentHandler,   getDriverName,   getElementPointer,   getElementQName,   getEntityName,   getFeatureDefault,   getPIData,   getPITarget,   getPropertyDefault,   getRecognizedFeatures,   getRecognizedProperties,   getScannerStateName,   getString,   hasAttributes,   isStandAlone,   next,   pr,   refresh,   refresh,   reset,   reset,   resetPointer,   scanAttribute,   scanCDATASection,   scanCharReference,   scanComment,   scanContent,   scanDocument,   scanEndElement,   scanEntityReference,   scanPIData,   scanStartElement,   scanXMLDeclOrTextDecl,   seekCloseOfStartTag,   setDocumentHandler,   setDriver,   setFeature,   setInputSource,   setProperty,   setScannerState,   skipElement,   skipElement,   skipFromTheBuffer,   skipQElement,   startEntity,   storePointerForADepth
Methods from com.sun.org.apache.xerces.internal.impl.XMLScanner:
endEntity,   getFeature,   getStringBuffer,   isInvalid,   isInvalidLiteral,   isValidNCName,   isValidNameChar,   isValidNameStartChar,   normalizeWhitespace,   reportFatalError,   reset,   reset,   reset,   scanAttributeValue,   scanCharReferenceValue,   scanComment,   scanExternalID,   scanPI,   scanPIData,   scanPseudoAttribute,   scanPubidLiteral,   scanSurrogates,   scanXMLDeclOrTextDecl,   setFeature,   setProperty,   setPropertyManager,   startEntity,   versionSupported
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl Detail:
 protected Driver createContentDriver() 
    Creates a content driver.
 public  void endEntity(String name,
    Augmentations augs) throws IOException, 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.
 public String getCharacterEncodingScheme() 
 public XMLStringBuffer getDTDDecl() 
 public Boolean getFeatureDefault(String featureId) 
    Returns the default state for a feature, or null if this component does not want to report a default value for this feature.
 public NamespaceContext getNamespaceContext() 
 public Object getPropertyDefault(String propertyId) 
    Returns the default state for a property, or null if this component does not want to report a default value for this property.
 public 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.
 public 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.
 protected String getScannerStateName(int state) 
    Returns the scanner state name.
 public int getScannetState() 
    return the state of the scanner
 public int next() throws IOException, XNIException 
    return the next state on the input
 public  void refresh(int refreshPosition) 
 public  void reset(PropertyManager propertyManager) 
 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.
 protected boolean scanDoctypeDecl(boolean ignore) throws IOException, XNIException 
    Scans a doctype declaration.
 public  void setFeature(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.

 public  void setInputSource(XMLInputSource inputSource) throws IOException 
    Sets the input source.
 public  void setProperty(String propertyId,
    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.

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