XML11DTDScannerImpl (Xerces2 Implementation)
Date: 2016-02-03

org.apache.xerces.impl

## Class XML11DTDScannerImpl

- java.lang.Object
- - org.apache.xerces.impl.XMLScanner
  - - org.apache.xerces.impl.XMLDTDScannerImpl
    - - org.apache.xerces.impl.XML11DTDScannerImpl

- All Implemented Interfaces:
    XMLEntityHandler, org.apache.xerces.xni.parser.XMLComponent, org.apache.xerces.xni.parser.XMLDTDContentModelSource, org.apache.xerces.xni.parser.XMLDTDScanner, org.apache.xerces.xni.parser.XMLDTDSource

      public class XML11DTDScannerImpl
      extends XMLDTDScannerImpl

  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
  Version:
    $Id: XML11DTDScannerImpl.java 572055 2007-09-02 17:55:43Z mrglavas $
  Author:
    Arnaud Le Hors, IBM, Andy Clark, IBM, Glenn Marcy, IBM, Eric Ye, IBM

  # INTERNAL:

    Usage of this class is not supported. It may be altered or removed at any time.

- - ### Field Summary

    - ### Fields inherited from class org.apache.xerces.impl.XMLDTDScannerImpl

      `fDTDContentModelHandler, fDTDHandler, fScannerState, fSeenExternalDTD, fSeenPEReferences, fStandalone, SCANNER_STATE_END_OF_INPUT, SCANNER_STATE_MARKUP_DECL, SCANNER_STATE_TEXT_DECL`

    - ### Fields inherited from class org.apache.xerces.impl.XMLScanner

      `DEBUG_ATTR_NORMALIZATION, ENTITY_MANAGER, ERROR_REPORTER, fAmpSymbol, fAposSymbol, fCharRefLiteral, fEncodingSymbol, fEntityDepth, fEntityManager, fEntityScanner, fErrorReporter, fGtSymbol, fLtSymbol, fNamespaces, fNotifyCharRefs, fParserSettings, fQuotSymbol, fReportEntity, fResourceIdentifier, fScanningAttribute, fStandaloneSymbol, fSymbolTable, fValidation, fVersionSymbol, NAMESPACES, NOTIFY_CHAR_REFS, PARSER_SETTINGS, SYMBOL_TABLE, VALIDATION`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `XML11DTDScannerImpl()` Default constructor.
    `XML11DTDScannerImpl(SymbolTable symbolTable, XMLErrorReporter errorReporter, XMLEntityManager entityManager)` Constructor for he use of non-XMLComponentManagers.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected java.lang.String` | `getVersionNotSupportedKey()`
    `protected boolean` | `isInvalid(int value)`
    `protected boolean` | `isInvalidLiteral(int value)`
    `protected int` | `isUnchangedByNormalization(org.apache.xerces.xni.XMLString value)` Checks whether this string would be unchanged by normalization.
    `protected boolean` | `isValidNameChar(int value)`
    `protected boolean` | `isValidNameStartChar(int value)`
    `protected boolean` | `isValidNameStartHighSurrogate(int value)`
    `protected boolean` | `isValidNCName(int value)`
    `protected void` | `normalizeWhitespace(org.apache.xerces.xni.XMLString value)` Normalize whitespace in an XMLString converting all whitespace characters to space characters.
    `protected void` | `normalizeWhitespace(org.apache.xerces.xni.XMLString value, int fromIndex)` Normalize whitespace in an XMLString converting all whitespace characters to space characters.
    `protected boolean` | `scanPubidLiteral(org.apache.xerces.xni.XMLString literal)` Scans public ID literal.
    `protected boolean` | `versionSupported(java.lang.String version)`

    - ### Methods inherited from class org.apache.xerces.impl.XMLDTDScannerImpl

      `endEntity, getDTDContentModelHandler, getDTDHandler, getFeatureDefault, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, reset, reset, scanAttDefaultDecl, scanAttlistDecl, scanComment, scanDecls, scanDTDExternalSubset, scanDTDInternalSubset, scanElementDecl, scanEntityValue, scanningInternalSubset, scanPIData, scanTextDecl, setDTDContentModelHandler, setDTDHandler, setInputSource, setScannerState, startEntity, startPE`

    - ### Methods inherited from class org.apache.xerces.impl.XMLScanner

      `getFeature, reportFatalError, scanAttributeValue, scanCharReferenceValue, scanComment, scanExternalID, scanPI, scanPseudoAttribute, 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 org.apache.xerces.xni.parser.XMLComponent

      `setFeature, setProperty`

- - ### Constructor Detail

    - #### XML11DTDScannerImpl

          public XML11DTDScannerImpl()

      Default constructor.

    - #### XML11DTDScannerImpl

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

      Constructor for he use of non-XMLComponentManagers.

  - ### Method Detail

    - #### scanPubidLiteral

          protected boolean scanPubidLiteral(org.apache.xerces.xni.XMLString literal)
                                      throws java.io.IOException,
                                             org.apache.xerces.xni.XNIException

      Scans public ID literal. [12] PubidLiteral ::= '"' PubidChar* '"' | "'" (PubidChar - "'")* "'" [13] PubidChar::= #x20 | #xD | #xA | [a-zA-Z0-9] | [-'()+,./:=?;!*#@$_%] The returned string is normalized according to the following rule, from http://www.w3.org/TR/REC-xml#dt-pubid: Before a match is attempted, all strings of white space in the public identifier must be normalized to single space characters (#x20), and leading and trailing white space must be removed.
      Overrides:
        `scanPubidLiteral` in class `XMLScanner`
      Parameters:
        `literal` - The string to fill in with the public ID literal.
      Returns:
        True on success. Note: This method uses fStringBuffer, anything in it at the time of calling is lost.
      Throws:
        `java.io.IOException`
        `org.apache.xerces.xni.XNIException`

    - #### normalizeWhitespace

          protected void normalizeWhitespace(org.apache.xerces.xni.XMLString value)

      Normalize whitespace in an XMLString converting all whitespace characters to space characters.
      Overrides:
        `normalizeWhitespace` in class `XMLScanner`

    - #### normalizeWhitespace

          protected void normalizeWhitespace(org.apache.xerces.xni.XMLString value,
                                 int fromIndex)

      Normalize whitespace in an XMLString converting all whitespace characters to space characters.
      Overrides:
        `normalizeWhitespace` in class `XMLScanner`

    - #### isUnchangedByNormalization

          protected int isUnchangedByNormalization(org.apache.xerces.xni.XMLString value)

      Checks whether this string would be unchanged by normalization.
      Overrides:
        `isUnchangedByNormalization` in class `XMLScanner`
      Returns:
        -1 if the value would be unchanged by normalization, otherwise the index of the first whitespace character which would be transformed.

    - #### isInvalid

          protected boolean isInvalid(int value)

      Overrides:
        `isInvalid` in class `XMLScanner`

    - #### isInvalidLiteral

          protected boolean isInvalidLiteral(int value)

      Overrides:
        `isInvalidLiteral` in class `XMLScanner`

    - #### isValidNameChar

          protected boolean isValidNameChar(int value)

      Overrides:
        `isValidNameChar` in class `XMLScanner`

    - #### isValidNameStartChar

          protected boolean isValidNameStartChar(int value)

      Overrides:
        `isValidNameStartChar` in class `XMLScanner`

    - #### isValidNCName

          protected boolean isValidNCName(int value)

      Overrides:
        `isValidNCName` in class `XMLScanner`

    - #### isValidNameStartHighSurrogate

          protected boolean isValidNameStartHighSurrogate(int value)

      Overrides:
        `isValidNameStartHighSurrogate` in class `XMLScanner`

    - #### versionSupported

          protected boolean versionSupported(java.lang.String version)

      Overrides:
        `versionSupported` in class `XMLScanner`

    - #### getVersionNotSupportedKey

          protected java.lang.String getVersionNotSupportedKey()

      Overrides:
        `getVersionNotSupportedKey` in class `XMLScanner`

Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.