org.apache.xerces.impl

Class XML11DTDScannerImpl

Implemented Interfaces:
org.apache.xerces.xni.parser.XMLComponent, org.apache.xerces.xni.parser.XMLDTDScanner, XMLEntityHandler

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:

Version:
$Id: XML11DTDScannerImpl.java,v 1.10 2004/01/26 19:37:35 mrglavas Exp $

Authors:
Arnaud Le Hors, IBM
Andy Clark, IBM
Glenn Marcy, IBM
Eric Ye, IBM

Field Summary

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

SCANNER_STATE_END_OF_INPUT, SCANNER_STATE_MARKUP_DECL, SCANNER_STATE_TEXT_DECL, fDTDContentModelHandler, fDTDHandler, fScannerState, fSeenExternalDTD, fSeenExternalPE, fStandalone

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

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

Constructor Summary

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

Method Summary

protected String
getVersionNotSupportedKey()
protected boolean
isInvalid(int value)
protected boolean
isInvalidLiteral(int value)
protected boolean
isValidNCName(int value)
protected boolean
isValidNameChar(int value)
protected boolean
isValidNameStartChar(int value)
protected boolean
isValidNameStartHighSurrogate(int value)
protected void
normalizeWhitespace(org.apache.xerces.xni.XMLString value)
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(String version)

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

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

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

endEntity, getFeature, getVersionNotSupportedKey, isInvalid, isInvalidLiteral, isValidNCName, isValidNameChar, isValidNameStartChar, isValidNameStartHighSurrogate, normalizeWhitespace, reportFatalError, reset, reset, scanAttributeValue, scanCharReferenceValue, scanComment, scanExternalID, scanPI, scanPIData, scanPseudoAttribute, scanPubidLiteral, scanSurrogates, scanXMLDeclOrTextDecl, setFeature, setProperty, startEntity, versionSupported

Constructor Details

XML11DTDScannerImpl

public XML11DTDScannerImpl()
Default constructor.


XML11DTDScannerImpl

public XML11DTDScannerImpl(SymbolTable symbolTable,
                           XMLErrorReporter errorReporter,
                           XMLEntityManager entityManager)
Constructor for he use of non-XMLComponentManagers.

Method Details

getVersionNotSupportedKey

protected String getVersionNotSupportedKey()
Overrides:
getVersionNotSupportedKey in interface XMLScanner


isInvalid

protected boolean isInvalid(int value)
Overrides:
isInvalid in interface XMLScanner


isInvalidLiteral

protected boolean isInvalidLiteral(int value)
Overrides:
isInvalidLiteral in interface XMLScanner


isValidNCName

protected boolean isValidNCName(int value)
Overrides:
isValidNCName in interface XMLScanner


isValidNameChar

protected boolean isValidNameChar(int value)
Overrides:
isValidNameChar in interface XMLScanner


isValidNameStartChar

protected boolean isValidNameStartChar(int value)
Overrides:
isValidNameStartChar in interface XMLScanner


isValidNameStartHighSurrogate

protected boolean isValidNameStartHighSurrogate(int value)
Overrides:
isValidNameStartHighSurrogate in interface XMLScanner


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 interface XMLScanner


scanPubidLiteral

protected boolean scanPubidLiteral(org.apache.xerces.xni.XMLString literal)
            throws 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 interface 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.


versionSupported

protected boolean versionSupported(String version)
Overrides:
versionSupported in interface XMLScanner


Copyright B) 1999-2004 Apache XML Project. All Rights Reserved.