|
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.XMLDTDScannerImpl
public class 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:
Field Summary | |
---|---|
protected XMLDTDContentModelHandler |
fDTDContentModelHandler
Deprecated. DTD content model handler. |
protected XMLDTDHandler |
fDTDHandler
Deprecated. DTD handler. |
protected int |
fScannerState
Deprecated. Scanner state. |
protected boolean |
fSeenExternalDTD
Deprecated. Seen external DTD. |
protected boolean |
fSeenExternalPE
Deprecated. Seen external parameter entity. |
protected boolean |
fStandalone
Deprecated. Standalone. |
protected static int |
SCANNER_STATE_END_OF_INPUT
Deprecated. Scanner state: end of input. |
protected static int |
SCANNER_STATE_MARKUP_DECL
Deprecated. Scanner state: markup declaration. |
protected static int |
SCANNER_STATE_TEXT_DECL
Deprecated. 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 | |
---|---|
XMLDTDScannerImpl()
Deprecated. Default constructor. |
|
XMLDTDScannerImpl(SymbolTable symbolTable,
XMLErrorReporter errorReporter,
XMLEntityManager entityManager)
Deprecated. Constructor for he use of non-XMLComponentManagers. |
Method Summary | |
---|---|
void |
endEntity(String name)
Deprecated. This method notifies the end of an entity. |
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. |
void |
reset()
Deprecated. |
void |
reset(XMLComponentManager componentManager)
Deprecated. reset |
protected String |
scanAttDefaultDecl(String elName,
String atName,
String type,
XMLString defaultVal,
XMLString nonNormalizedDefaultVal)
Deprecated. Scans an attribute default declaration |
protected void |
scanAttlistDecl()
Deprecated. Scans an attlist declaration |
protected void |
scanComment()
Deprecated. Scans a comment. |
protected boolean |
scanDecls(boolean complete)
Deprecated. Dispatch an XML "event". |
boolean |
scanDTDExternalSubset(boolean complete)
Deprecated. Scans the external subset of the document. |
boolean |
scanDTDInternalSubset(boolean complete,
boolean standalone,
boolean hasExternalSubset)
Deprecated. Scans the internal subset of the document. |
protected void |
scanElementDecl()
Deprecated. Scans an element declaration |
protected void |
scanEntityValue(XMLString value,
XMLString nonNormalizedValue)
Deprecated. Scans an entity value. |
protected boolean |
scanningInternalSubset()
Deprecated. |
protected void |
scanPIData(String target,
XMLString data)
Deprecated. Scans a processing data. |
protected boolean |
scanTextDecl()
Deprecated. Dispatch an XML "event". |
void |
setDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler)
Deprecated. setDTDContentModelHandler |
void |
setDTDHandler(XMLDTDHandler dtdHandler)
Deprecated. setDTDHandler |
void |
setInputSource(XMLInputSource inputSource)
Deprecated. Sets the input source. |
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. |
protected void |
startPE(String name,
boolean literal)
Deprecated. start a parameter entity dealing with the textdecl if there is any |
Methods inherited from class weblogic.apache.xerces.impl.XMLScanner |
---|
getFeature, normalizeWhitespace, reportFatalError, scanAttributeValue, scanCharReferenceValue, scanComment, scanExternalID, scanPI, scanPseudoAttribute, scanPubidLiteral, 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 weblogic.apache.xerces.xni.parser.XMLComponent |
---|
setFeature, setProperty |
Field Detail |
---|
protected static final int SCANNER_STATE_END_OF_INPUT
protected static final int SCANNER_STATE_TEXT_DECL
protected static final int SCANNER_STATE_MARKUP_DECL
protected XMLDTDHandler fDTDHandler
protected XMLDTDContentModelHandler fDTDContentModelHandler
protected int fScannerState
protected boolean fStandalone
protected boolean fSeenExternalDTD
protected boolean fSeenExternalPE
Constructor Detail |
---|
public XMLDTDScannerImpl()
public XMLDTDScannerImpl(SymbolTable symbolTable, XMLErrorReporter errorReporter, XMLEntityManager entityManager)
Method Detail |
---|
public void setInputSource(XMLInputSource inputSource) throws IOException
setInputSource
in interface XMLDTDScanner
inputSource
- The input source or null.
IOException
- Thrown on i/o error.public boolean scanDTDExternalSubset(boolean complete) throws IOException, XNIException
scanDTDExternalSubset
in interface XMLDTDScanner
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.
IOException
XNIException
public boolean scanDTDInternalSubset(boolean complete, boolean standalone, boolean hasExternalSubset) throws IOException, XNIException
scanDTDInternalSubset
in interface XMLDTDScanner
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.standalone
- True if the document was specified as standalone.
This value is important for verifying certain
well-formedness constraints.hasExternalDTD
- True if the document has an external DTD.
This allows the scanner to properly notify
the handler of the end of the DTD in the
absence of an external subset.
IOException
XNIException
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException
reset
in interface XMLComponent
reset
in class XMLScanner
componentManager
-
XMLConfigurationException
public void reset()
reset
in class XMLScanner
public String[] getRecognizedFeatures()
getRecognizedFeatures
in interface XMLComponent
public String[] getRecognizedProperties()
getRecognizedProperties
in interface XMLComponent
public void setDTDHandler(XMLDTDHandler dtdHandler)
setDTDHandler
in interface XMLDTDSource
dtdHandler
- public void setDTDContentModelHandler(XMLDTDContentModelHandler dtdContentModelHandler)
setDTDContentModelHandler
in interface XMLDTDContentModelSource
dtdContentModelHandler
- public void startEntity(String name, XMLResourceIdentifier identifier, String encoding) throws XNIException
startEntity
in interface XMLEntityHandler
startEntity
in class XMLScanner
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).
XNIException
- Thrown by handler to signal an error.public void endEntity(String name) throws XNIException
endEntity
in interface XMLEntityHandler
endEntity
in class XMLScanner
name
- The name of the entity.
XNIException
- Thrown by handler to signal an error.protected final void setScannerState(int state)
state
- The new scanner state.protected final boolean scanningInternalSubset()
protected void startPE(String name, boolean literal) throws IOException, XNIException
name
- The name of the parameter entity to start (without the '%')literal
- Whether this is happening within a literal
IOException
XNIException
protected final boolean scanTextDecl() throws IOException, XNIException
complete
- True if this method is intended to scan
and dispatch as much as possible.
IOException
- Thrown on i/o error.
XNIException
- Thrown on parse error.protected final void scanPIData(String target, XMLString data) throws IOException, XNIException
scanPIData
in class XMLScanner
target
- The PI targetdata
- The string to fill in with the data
IOException
XNIException
protected final void scanComment() throws IOException, XNIException
[15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
Note: Called after scanning past '<!--'
IOException
XNIException
protected final void scanElementDecl() throws IOException, XNIException
[45] elementdecl ::= '<!ELEMENT' S Name S contentspec S? '>' [46] contentspec ::= 'EMPTY' | 'ANY' | Mixed | children
Note: Called after scanning past '<!ELEMENT'
IOException
XNIException
protected final void scanAttlistDecl() throws IOException, XNIException
[52] AttlistDecl ::= '<!ATTLIST' S Name AttDef* S? '>' [53] AttDef ::= S Name S AttType S DefaultDecl
Note: Called after scanning past '<!ATTLIST'
IOException
XNIException
protected final String scanAttDefaultDecl(String elName, String atName, String type, XMLString defaultVal, XMLString nonNormalizedDefaultVal) throws IOException, XNIException
[60] DefaultDecl ::= '#REQUIRED' | '#IMPLIED' | (('#FIXED' S)? AttValue)
name
- The name of the attribute being scanned.defaultVal
- The string to fill in with the default value.
IOException
XNIException
protected final void scanEntityValue(XMLString value, XMLString nonNormalizedValue) throws IOException, XNIException
value
- The string to fill in with the value.nonNormalizedValue
- The string to fill in with the
non-normalized value.
Note: This method uses fString, fStringBuffer (through
the use of scanCharReferenceValue), and fStringBuffer2, anything in them
at the time of calling is lost.
IOException
XNIException
protected final boolean scanDecls(boolean complete) throws IOException, XNIException
complete
- True if this method is intended to scan
and dispatch as much as possible.
IOException
- Thrown on i/o error.
XNIException
- Thrown on parse error.
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs92 Copyright 2006 BEA Systems Inc. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |