|
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
This class is responsible for holding scanning methods common to scanning the XML document structure and content as well as the DTD structure and content. Both XMLDocumentScanner and XMLDTDScanner inherit from this base class.
This component requires the following features and properties from the component manager that uses it:
Field Summary | |
protected static boolean |
DEBUG_ATTR_NORMALIZATION
Deprecated. Debug attribute normalization. |
protected static String |
ENTITY_MANAGER
Deprecated. Property identifier: entity manager. |
protected static String |
ERROR_REPORTER
Deprecated. Property identifier: error reporter. |
protected static String |
fAmpSymbol
Deprecated. Symbol: "amp". |
protected static String |
fAposSymbol
Deprecated. Symbol: "apos". |
protected String |
fCharRefLiteral
Deprecated. Literal value of the last character refence scanned. |
protected static String |
fEncodingSymbol
Deprecated. Symbol: "encoding". |
protected int |
fEntityDepth
Deprecated. Entity depth. |
protected XMLEntityManager |
fEntityManager
Deprecated. Entity manager. |
protected XMLEntityScanner |
fEntityScanner
Deprecated. Entity scanner. |
protected XMLErrorReporter |
fErrorReporter
Deprecated. Error reporter. |
protected static String |
fGtSymbol
Deprecated. Symbol: "gt". |
protected static String |
fLtSymbol
Deprecated. Symbol: "lt". |
protected boolean |
fNotifyCharRefs
Deprecated. Character references notification. |
protected static String |
fQuotSymbol
Deprecated. Symbol: "quot". |
protected boolean |
fReportEntity
Deprecated. Report entity boundary. |
protected XMLResourceIdentifierImpl |
fResourceIdentifier
Deprecated. |
protected boolean |
fScanningAttribute
Deprecated. Scanning attribute. |
protected static String |
fStandaloneSymbol
Deprecated. Symbol: "standalone". |
protected SymbolTable |
fSymbolTable
Deprecated. Symbol table. |
protected boolean |
fValidation
Deprecated. Validation. |
protected static String |
fVersionSymbol
Deprecated. Symbol: "version". |
protected static String |
NOTIFY_CHAR_REFS
Deprecated. Feature identifier: notify character references. |
protected static String |
SYMBOL_TABLE
Deprecated. Property identifier: symbol table. |
protected static String |
VALIDATION
Deprecated. Feature identifier: validation. |
Constructor Summary | |
XMLScanner()
Deprecated. |
Method Summary | |
void |
endEntity(String name)
Deprecated. This method notifies the end of an entity. |
boolean |
getFeature(String featureId)
Deprecated. |
protected void |
normalizeWhitespace(XMLString value)
Deprecated. Normalize whitespace in an XMLString converting all whitespace characters to space characters. |
protected void |
reportFatalError(String msgId,
Object[] args)
Deprecated. Convenience function used in all XML scanners. |
protected void |
reset()
Deprecated. |
void |
reset(XMLComponentManager componentManager)
Deprecated. |
protected void |
scanAttributeValue(XMLString value,
XMLString nonNormalizedValue,
String atName,
XMLAttributes attributes,
int attrIndex,
boolean checkEntities)
Deprecated. Scans an attribute value and normalizes whitespace converting all whitespace characters to space characters. |
protected int |
scanCharReferenceValue(XMLStringBuffer buf,
XMLStringBuffer buf2)
Deprecated. Scans a character reference and append the corresponding chars to the specified buffer. |
protected void |
scanComment(XMLStringBuffer text)
Deprecated. Scans a comment. |
protected void |
scanExternalID(String[] identifiers,
boolean optionalSystemId)
Deprecated. Scans External ID and return the public and system IDs. |
protected void |
scanPI()
Deprecated. Scans a processing instruction. |
protected void |
scanPIData(String target,
XMLString data)
Deprecated. Scans a processing data. |
String |
scanPseudoAttribute(boolean scanningTextDecl,
XMLString value)
Deprecated. Scans a pseudo attribute. |
protected boolean |
scanPubidLiteral(XMLString literal)
Deprecated. Scans public ID literal. |
protected boolean |
scanSurrogates(XMLStringBuffer buf)
Deprecated. Scans surrogates and append them to the specified buffer. |
protected void |
scanXMLDeclOrTextDecl(boolean scanningTextDecl,
String[] pseudoAttributeValues)
Deprecated. Scans an XML or text declaration. |
void |
setFeature(String featureId,
boolean value)
Deprecated. |
void |
setProperty(String propertyId,
Object value)
Deprecated. Sets the value of a property during parsing. |
void |
startEntity(String name,
XMLResourceIdentifier identifier,
String encoding)
Deprecated. This method notifies of the start of an entity. |
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 |
getRecognizedFeatures, getRecognizedProperties |
Field Detail |
protected static final boolean DEBUG_ATTR_NORMALIZATION
protected static final String ENTITY_MANAGER
protected static final String ERROR_REPORTER
protected static final String fAmpSymbol
protected static final String fAposSymbol
protected String fCharRefLiteral
protected static final String fEncodingSymbol
protected int fEntityDepth
protected XMLEntityManager fEntityManager
protected XMLEntityScanner fEntityScanner
protected XMLErrorReporter fErrorReporter
protected static final String fGtSymbol
protected static final String fLtSymbol
protected boolean fNotifyCharRefs
protected static final String fQuotSymbol
protected boolean fReportEntity
protected XMLResourceIdentifierImpl fResourceIdentifier
protected boolean fScanningAttribute
protected static final String fStandaloneSymbol
protected SymbolTable fSymbolTable
protected boolean fValidation
protected static final String fVersionSymbol
protected static final String NOTIFY_CHAR_REFS
protected static final String SYMBOL_TABLE
protected static final String VALIDATION
Constructor Detail |
public XMLScanner()
Method Detail |
public void endEntity(String name) throws XNIException
name
- The name of the entity.
XNIException
- Thrown by handler to signal an error.public boolean getFeature(String featureId) throws XMLConfigurationException
XMLConfigurationException
protected void normalizeWhitespace(XMLString value)
protected void reportFatalError(String msgId, Object[] args) throws XNIException
XNIException
protected void reset()
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException
XMLComponent
reset
in interface XMLComponent
componentManager
- The component manager.
SAXException
- Throws exception if required features and
properties cannot be found.
XMLConfigurationException
protected void scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, XMLAttributes attributes, int attrIndex, boolean checkEntities) throws IOException, XNIException
value
- The XMLString to fill in with the value.nonNormalizedValue
- The XMLString to fill in with the
non-normalized value.atName
- The name of the attribute being parsed (for error msgs).attributes
- The attributes list for the scanned attribute.attrIndex
- The index of the attribute to use from the list.checkEntities
- true if undeclared entities should be reported as VC violation,
false if undeclared entities should be reported as WFC violation.
Note: This method uses fStringBuffer2, anything in it
at the time of calling is lost.
IOException
XNIException
protected int scanCharReferenceValue(XMLStringBuffer buf, XMLStringBuffer buf2) throws IOException, XNIException
[66] CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';'Note: This method uses fStringBuffer, anything in it at the time of calling is lost.
buf
- the character buffer to append chars tobuf2
- the character buffer to append non-normalized chars to
IOException
XNIException
protected void scanComment(XMLStringBuffer text) throws IOException, XNIException
[15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
Note: Called after scanning past '<!--' Note: This method uses fString, anything in it at the time of calling is lost.
text
- The buffer to fill in with the text.
IOException
XNIException
protected void scanExternalID(String[] identifiers, boolean optionalSystemId) throws IOException, XNIException
identifiers
- An array of size 2 to return the system id,
and public id (in that order).optionalSystemId
- Specifies whether the system id is optional.
Note: This method uses fString and fStringBuffer,
anything in them at the time of calling is lost.
IOException
XNIException
protected void scanPI() throws IOException, XNIException
[16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>' [17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))Note: This method uses fString, anything in it at the time of calling is lost.
IOException
XNIException
protected void scanPIData(String target, XMLString data) throws IOException, XNIException
target
- The PI targetdata
- The string to fill in with the data
IOException
XNIException
public String scanPseudoAttribute(boolean scanningTextDecl, XMLString value) throws IOException, XNIException
scanningTextDecl
- True if scanning this pseudo-attribute for a
TextDecl; false if scanning XMLDecl. This
flag is needed to report the correct type of
error.value
- The string to fill in with the attribute
value.
IOException
XNIException
protected boolean scanPubidLiteral(XMLString literal) throws IOException, XNIException
literal
- The string to fill in with the public ID literal.
IOException
XNIException
protected boolean scanSurrogates(XMLStringBuffer buf) throws IOException, XNIException
Note: This assumes the current char has already been identified as a high surrogate.
buf
- The StringBuffer to append the read surrogates to.
IOException
XNIException
protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl, String[] pseudoAttributeValues) throws IOException, XNIException
[23] XMLDecl ::= '' [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 ::= ''
scanningTextDecl
- True if a text declaration is to
be scanned instead of an XML
declaration.pseudoAttributeValues
- An array of size 3 to return the version,
encoding and standalone pseudo attribute values
(in that order).
Note: This method uses fString, anything in it
at the time of calling is lost.
IOException
XNIException
public void setFeature(String featureId, boolean value) throws XMLConfigurationException
XMLComponent
Note: Components should silently ignore features that do not affect the operation of the component.
setFeature
in interface XMLComponent
featureId
- The feature identifier.value
- The state of the feature.
XMLConfigurationException
- Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public void setProperty(String propertyId, Object value) throws XMLConfigurationException
setProperty
in interface XMLComponent
propertyId
- value
-
XMLConfigurationException
- Thrown for configuration error.
In general, components should
only throw this exception if
it is really
a critical error.public void startEntity(String name, XMLResourceIdentifier identifier, 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).
XNIException
- Thrown by handler to signal an error.
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs91 Copyright 2005 BEA Systems Inc. |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |