This component requires the following features and properties from the component manager that uses it:
| Modifier and Type | Class and Description |
|---|---|
| public static enum | XMLScanner.
Type of names |
| Modifier and Type | Field and Description |
|---|---|
| protected ArrayList | |
| protected static final boolean | DEBUG_ATTR_NORMALIZATION
Debug attribute normalization. |
| protected static final String | ENTITY_MANAGER
Property identifier: entity manager. |
| protected static final String | ERROR_REPORTER
Property identifier: error reporter. |
| protected static final String | fAmpSymbol
Symbol: "amp". |
| protected static final String | fAposSymbol
Symbol: "apos". |
| protected boolean | |
| protected int | |
| protected String | fCharRefLiteral
Literal value of the last character reference scanned. |
| protected static final String | fEncodingSymbol
Symbol: "encoding". |
| protected int | fEntityDepth
Entity depth. |
| protected XMLEntityManager | fEntityManager
Entity manager. |
| protected XMLEntityScanner | fEntityScanner
Entity scanner, this always works on last entity that was opened. |
| protected XMLEntityStorage | fEntityStore
xxx this should be available from EntityManager Entity storage |
| protected XMLErrorReporter | fErrorReporter
Error reporter. |
| protected XMLEvent | fEvent
event type |
| protected static final String | fGtSymbol
Symbol: "gt". |
| protected XMLLimitAnalyzer | fLimitAnalyzer
Limit analyzer. |
| protected static final String | fLtSymbol
Symbol: "lt". |
| protected boolean | fNamespaces
Namespaces. |
| private boolean | |
| protected boolean | fNotifyCharRefs
Character references notification. |
| protected boolean | fParserSettings
Internal parser-settings feature |
| protected PropertyManager | |
| protected static final String | fQuotSymbol
Symbol: "quot". |
| protected boolean | fReportEntity
Report entity boundary. |
| protected XMLResourceIdentifierImpl | |
| protected boolean | fScanningAttribute
Scanning attribute. |
| protected XMLSecurityManager | fSecurityManager
Security manager. |
| protected static final String | fStandaloneSymbol
Symbol: "standalone". |
| private XMLString | fString
String. |
| private XMLStringBuffer | fStringBuffer
String buffer. |
| private XMLStringBuffer | fStringBuffer2
String buffer. |
| private XMLStringBuffer | fStringBuffer3
String buffer. |
| protected int | |
| protected SymbolTable | fSymbolTable
Symbol table. |
| protected boolean | fValidation
Validation. |
| protected static final String | fVersionSymbol
Symbol: "version". |
| pack-priv int | |
| protected static final String | NAMESPACES
Feature identifier: namespaces. |
| protected static final String | NOTIFY_CHAR_REFS
Feature identifier: notify character references. |
| protected static final String | |
| private static final String | SECURITY_MANAGER
Property identifier: Security manager. |
| protected ArrayList | |
| protected static final String | SYMBOL_TABLE
Property identifier: symbol table. |
| protected static final String | VALIDATION
Feature identifier: validation. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | checkEntityLimit(boolean
a flag to indicate whether the entity is parameter isPEDecl, String entity name entityName, XMLString content buffer buffer)Add the count of the content buffer and check if the accumulated value exceeds the limit |
| pack-priv void | checkEntityLimit(boolean
a flag to indicate whether the entity is parameter isPEDecl, String entity name entityName, int length of the buffer len)Add the count and check limit |
| public void | endEntity(String
The name of the entity. name, Augmentations augs)This method notifies the end of an entity. |
| public boolean | |
| pack-priv XMLStringBuffer | |
| private void | |
| protected boolean | |
| protected boolean | |
| protected boolean | |
| protected boolean | |
| protected boolean | |
| protected boolean | |
| protected void | normalizeWhitespace(XMLString value)
Normalize whitespace in an XMLString converting all whitespace characters to space characters. |
| protected void | |
| public void | reset(XMLComponentManager
The component manager. componentManager)Implements com. Resets the component. |
| protected void | |
| public void | |
| protected boolean | Returns: true if resolved, false otherwisethe name of the entity entityName, XMLStringBuffer the current XMLStringBuffer to append the character to. stringBuffer)Resolves character entity references. |
| protected void | scanAttributeValue(XMLString
The XMLString to fill in with the value. value, XMLString The XMLString to fill in with the
non-normalized value. nonNormalizedValue, String The name of the attribute being parsed (for error msgs). atName, XMLAttributes The attributes list for the scanned attribute. attributes, int The index of the attribute to use from the list. attrIndex, boolean true if undeclared entities should be reported as VC violation,
false if undeclared entities should be reported as WFC violation. checkEntities, String The name of element to which this attribute belongs. eleName, boolean a flag indicating whether the content is a Namespace URI
isNSURI)Note This method uses fStringBuffer2, anything in it at the time of calling is lost. Scans an attribute value and normalizes whitespace converting all whitespace characters to space characters. |
| protected int | Returns: the character value or (-1) on conversion failurethe character buffer to append chars to buf, XMLStringBuffer the character buffer to append non-normalized chars to buf2)Scans a character reference and append the corresponding chars to the specified buffer. |
| protected void | |
| protected void | scanExternalID(String[]
An array of size 2 to return the system id,
and public id (in that order). identifiers, boolean Specifies whether the system id is optional optionalSystemId)Note This method uses fString and fStringBuffer, anything in them at the time of calling is lost. Scans External ID and return the public and system IDs. |
| protected void | |
| protected void | scanPIData(String
The PI target target, XMLStringBuffer The string to fill in with the data data)Scans a processing data. |
| protected String | Returns: The name of the attributeNote This method uses fStringBuffer2, anything in it at the time of calling is lost. True if scanning this pseudo-attribute for a
TextDecl; false if scanning XMLDecl. This
flag is needed to report the correct type of
error. scanningTextDecl, XMLString The string to fill in with the attribute
value. value)Scans a pseudo attribute. |
| private String | Returns: the name of the pseudo attribute ornull
if a legal pseudo attribute name could not be scanned.Scans the name of a pseudo attribute. |
| protected boolean | Returns: True on successNote This method uses fStringBuffer, anything in it at the time of calling is lost. The string to fill in with the public ID literal. literal)Scans public ID literal. |
| protected boolean | Returns: True if it succeeded.The StringBuffer to append the read surrogates to. buf)Scans surrogates and append them to the specified buffer. |
| protected void | scanXMLDeclOrTextDecl(boolean
True if a text declaration is to
be scanned instead of an XML
declaration. scanningTextDecl, String[] An array of size 3 to return the version,
encoding and standalone pseudo attribute values
(in that order) pseudoAttributeValues)Note This method uses fString, anything in it at the time of calling is lost. Scans an XML or text declaration. |
| public void | setFeature(String featureId, boolean value)
Implements com. Sets the state of a feature. |
| public void | setProperty(String propertyId, Object value)
Implements com. Sets the value of a property during parsing. |
| protected void | |
| public void | startEntity(String
The name of the entity. name, XMLResourceIdentifier The resource identifier. identifier, String 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). encoding, Augmentations augs)This method notifies of the start of an entity. |
| protected boolean |
| attributeValueCache | back to summary |
|---|---|
| protected ArrayList<XMLString> attributeValueCache | |
| DEBUG_ATTR_NORMALIZATION | back to summary |
|---|---|
| protected static final boolean DEBUG_ATTR_NORMALIZATION Debug attribute normalization. | |
| ENTITY_MANAGER | back to summary |
|---|---|
| protected static final String ENTITY_MANAGER Property identifier: entity manager. | |
| ERROR_REPORTER | back to summary |
|---|---|
| protected static final String ERROR_REPORTER Property identifier: error reporter. | |
| fAmpSymbol | back to summary |
|---|---|
| protected static final String fAmpSymbol Symbol: "amp". | |
| fAposSymbol | back to summary |
|---|---|
| protected static final String fAposSymbol Symbol: "apos". | |
| fAttributeCacheInitDone | back to summary |
|---|---|
| protected boolean fAttributeCacheInitDone | |
| fAttributeCacheUsedCount | back to summary |
|---|---|
| protected int fAttributeCacheUsedCount | |
| fCharRefLiteral | back to summary |
|---|---|
| protected String fCharRefLiteral Literal value of the last character reference scanned. | |
| fEncodingSymbol | back to summary |
|---|---|
| protected static final String fEncodingSymbol Symbol: "encoding". | |
| fEntityDepth | back to summary |
|---|---|
| protected int fEntityDepth Entity depth. | |
| fEntityManager | back to summary |
|---|---|
| protected XMLEntityManager fEntityManager Entity manager. | |
| fEntityScanner | back to summary |
|---|---|
| protected XMLEntityScanner fEntityScanner Entity scanner, this always works on last entity that was opened. | |
| fEntityStore | back to summary |
|---|---|
| protected XMLEntityStorage fEntityStore xxx this should be available from EntityManager Entity storage | |
| fErrorReporter | back to summary |
|---|---|
| protected XMLErrorReporter fErrorReporter Error reporter. | |
| fEvent | back to summary |
|---|---|
| protected XMLEvent fEvent event type | |
| fGtSymbol | back to summary |
|---|---|
| protected static final String fGtSymbol Symbol: "gt". | |
| fLimitAnalyzer | back to summary |
|---|---|
| protected XMLLimitAnalyzer fLimitAnalyzer Limit analyzer. | |
| fLtSymbol | back to summary |
|---|---|
| protected static final String fLtSymbol Symbol: "lt". | |
| fNamespaces | back to summary |
|---|---|
| protected boolean fNamespaces Namespaces. | |
| fNeedNonNormalizedValue | back to summary |
|---|---|
| private boolean fNeedNonNormalizedValue | |
| fNotifyCharRefs | back to summary |
|---|---|
| protected boolean fNotifyCharRefs Character references notification. | |
| fParserSettings | back to summary |
|---|---|
| protected boolean fParserSettings Internal parser-settings feature | |
| fPropertyManager | back to summary |
|---|---|
| protected PropertyManager fPropertyManager | |
| fQuotSymbol | back to summary |
|---|---|
| protected static final String fQuotSymbol Symbol: "quot". | |
| fReportEntity | back to summary |
|---|---|
| protected boolean fReportEntity Report entity boundary. | |
| fResourceIdentifier | back to summary |
|---|---|
| protected XMLResourceIdentifierImpl fResourceIdentifier | |
| fScanningAttribute | back to summary |
|---|---|
| protected boolean fScanningAttribute Scanning attribute. | |
| fSecurityManager | back to summary |
|---|---|
| protected XMLSecurityManager fSecurityManager Security manager. | |
| fStandaloneSymbol | back to summary |
|---|---|
| protected static final String fStandaloneSymbol Symbol: "standalone". | |
| fString | back to summary |
|---|---|
| private XMLString fString String. | |
| fStringBuffer | back to summary |
|---|---|
| private XMLStringBuffer fStringBuffer String buffer. | |
| fStringBuffer2 | back to summary |
|---|---|
| private XMLStringBuffer fStringBuffer2 String buffer. | |
| fStringBuffer3 | back to summary |
|---|---|
| private XMLStringBuffer fStringBuffer3 String buffer. | |
| fStringBufferIndex | back to summary |
|---|---|
| protected int fStringBufferIndex | |
| fSymbolTable | back to summary |
|---|---|
| protected SymbolTable fSymbolTable Symbol table. | |
| fValidation | back to summary |
|---|---|
| protected boolean fValidation Validation. This feature identifier is: http://xml.org/sax/features/validation | |
| fVersionSymbol | back to summary |
|---|---|
| protected static final String fVersionSymbol Symbol: "version". | |
| initialCacheCount | back to summary |
|---|---|
| pack-priv int initialCacheCount | |
| NAMESPACES | back to summary |
|---|---|
| protected static final String NAMESPACES Feature identifier: namespaces. | |
| NOTIFY_CHAR_REFS | back to summary |
|---|---|
| protected static final String NOTIFY_CHAR_REFS Feature identifier: notify character references. | |
| PARSER_SETTINGS | back to summary |
|---|---|
| protected static final String PARSER_SETTINGS | |
| SECURITY_MANAGER | back to summary |
|---|---|
| private static final String SECURITY_MANAGER Property identifier: Security manager. | |
| stringBufferCache | back to summary |
|---|---|
| protected ArrayList<XMLStringBuffer> stringBufferCache | |
| SYMBOL_TABLE | back to summary |
|---|---|
| protected static final String SYMBOL_TABLE Property identifier: symbol table. | |
| VALIDATION | back to summary |
|---|---|
| protected static final String VALIDATION Feature identifier: validation. | |
| XMLScanner | back to summary |
|---|---|
| public XMLScanner() | |
| checkEntityLimit | back to summary |
|---|---|
| pack-priv void checkEntityLimit(boolean isPEDecl, String entityName, XMLString buffer) Add the count of the content buffer and check if the accumulated value exceeds the limit | |
| checkEntityLimit | back to summary |
|---|---|
| pack-priv void checkEntityLimit(boolean isPEDecl, String entityName, int len) Add the count and check limit
| |
| endEntity | back to summary |
|---|---|
| public void endEntity(String name, Augmentations augs) throws IOException, XNIException This method notifies the end of an entity. The document entity has the pseudo-name of "[xml]" the DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name.
| |
| getFeature | back to summary |
|---|---|
| public boolean getFeature(String featureId) throws XMLConfigurationException | |
| getStringBuffer | back to summary |
|---|---|
| pack-priv XMLStringBuffer getStringBuffer() | |
| init | back to summary |
|---|---|
| private void init() | |
| isInvalid | back to summary |
|---|---|
| protected boolean isInvalid(int value) | |
| isInvalidLiteral | back to summary |
|---|---|
| protected boolean isInvalidLiteral(int value) | |
| isValidNameChar | back to summary |
|---|---|
| protected boolean isValidNameChar(int value) | |
| isValidNameStartChar | back to summary |
|---|---|
| protected boolean isValidNameStartChar(int value) | |
| isValidNameStartHighSurrogate | back to summary |
|---|---|
| protected boolean isValidNameStartHighSurrogate(int value) | |
| isValidNCName | back to summary |
|---|---|
| protected boolean isValidNCName(int value) | |
| normalizeWhitespace | back to summary |
|---|---|
| protected void normalizeWhitespace(XMLString value) Normalize whitespace in an XMLString converting all whitespace characters to space characters. | |
| reportFatalError | back to summary |
|---|---|
| protected void reportFatalError(String msgId, Object[] args) throws XNIException Convenience function used in all XML scanners. | |
| reset | back to summary |
|---|---|
| public void reset(XMLComponentManager componentManager) throws XMLConfigurationException Implements com. Doc from com. Resets the component. The component can query the component manager about any features and properties that affect the operation of the component.
| |
| reset | back to summary |
|---|---|
| protected void reset() | |
| reset | back to summary |
|---|---|
| public void reset(PropertyManager propertyManager) | |
| resolveCharacter | back to summary |
|---|---|
| protected boolean resolveCharacter(String entityName, XMLStringBuffer stringBuffer) Resolves character entity references.
| |
| scanAttributeValue | back to summary |
|---|---|
| protected void scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, XMLAttributes attributes, int attrIndex, boolean checkEntities, String eleName, boolean isNSURI) throws IOException, XNIException Scans an attribute value and normalizes whitespace converting all whitespace characters to space characters. [10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
| |
| scanCharReferenceValue | back to summary |
|---|---|
| protected int scanCharReferenceValue(XMLStringBuffer buf, XMLStringBuffer buf2) throws IOException, XNIException Scans a character reference and append the corresponding chars to the specified buffer.
[66] CharRef ::= '' [0-9]+ ';' | '' [0-9a-fA-F]+ ';' Note This method uses fStringBuffer, anything in it at the time of calling is lost.
| |
| scanComment | back to summary |
|---|---|
| protected void scanComment(XMLStringBuffer text) throws IOException, XNIException Scans a comment.
[15] Comment ::= '<!--' ((Char - '-') | ('-' (Char - '-')))* '-->'
Note Called after scanning past '<!--' Note This method uses fString, anything in it at the time of calling is lost.
| |
| scanExternalID | back to summary |
|---|---|
| protected void scanExternalID(String[] identifiers, boolean optionalSystemId) throws IOException, XNIException Scans External ID and return the public and system IDs.
| |
| scanPI | back to summary |
|---|---|
| protected void scanPI(XMLStringBuffer data) throws IOException, XNIException Scans a processing instruction.
[16] PI ::= '<?' PITarget (S (Char* - (Char* '?>' Char*)))? '?>'
[17] PITarget ::= Name - (('X' | 'x') ('M' | 'm') ('L' | 'l'))
| |
| scanPIData | back to summary |
|---|---|
| protected void scanPIData(String target, XMLStringBuffer data) throws IOException, XNIException Scans a processing data. This is needed to handle the situation where a document starts with a processing instruction whose target name starts with "xml". (e.g. xmlfoo) This method would always read the whole data. We have while loop and data is buffered until delimeter is encountered.
| |
| scanPseudoAttribute | back to summary |
|---|---|
| protected String scanPseudoAttribute(boolean scanningTextDecl, XMLString value) throws IOException, XNIException Scans a pseudo attribute.
| |
| scanPseudoAttributeName | back to summary |
|---|---|
| private String scanPseudoAttributeName() throws IOException, XNIException Scans the name of a pseudo attribute. The only legal names in XML 1.0/1.1 documents are 'version', 'encoding' and 'standalone'.
| |
| scanPubidLiteral | back to summary |
|---|---|
| protected boolean scanPubidLiteral(XMLString literal) throws IOException, 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.
| |
| scanSurrogates | back to summary |
|---|---|
| protected boolean scanSurrogates(XMLStringBuffer buf) throws IOException, XNIException Scans surrogates and append them to the specified buffer. Note This assumes the current char has already been identified as a high surrogate.
| |
| scanXMLDeclOrTextDecl | back to summary |
|---|---|
| protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl, String[] pseudoAttributeValues) throws IOException, XNIException Scans an XML or text declaration.
[23] XMLDecl ::= '<?xml' VersionInfo EncodingDecl? SDDecl? S? '?>'
[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 ::= '<?xml' VersionInfo? EncodingDecl S? '?>'
| |
| setFeature | back to summary |
|---|---|
| public void setFeature(String featureId, boolean value) throws XMLConfigurationException Implements com. Doc from com. 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.
| |
| setProperty | back to summary |
|---|---|
| public void setProperty(String propertyId, Object value) throws XMLConfigurationException Implements com. Sets the value of a property during parsing.
| |
| setPropertyManager | back to summary |
|---|---|
| protected void setPropertyManager(PropertyManager propertyManager) | |
| startEntity | back to summary |
|---|---|
| public void startEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException This method notifies of the start of an entity. The document entity has the pseudo-name of "[xml]" the DTD has the pseudo-name of "[dtd]" parameter entity names start with '%'; and general entities are just specified by their name.
| |
| versionSupported | back to summary |
|---|---|
| protected boolean versionSupported(String version) | |
| Modifier and Type | Field and Description |
|---|---|
| public static final XMLScanner. | |
| public static final XMLScanner. | |
| public static final XMLScanner. | |
| public static final XMLScanner. | |
| public static final XMLScanner. | |
| public static final XMLScanner. | |
| public static final XMLScanner. | |
| pack-priv final String | |
| public static final XMLScanner. | |
| public static final XMLScanner. | |
| public static final XMLScanner. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv String | |
| public static XMLScanner. | |
| public static XMLScanner. |
| ATTRIBUTE | back to summary |
|---|---|
| public static final XMLScanner. | |
| ATTRIBUTENAME | back to summary |
|---|---|
| public static final XMLScanner. | |
| COMMENT | back to summary |
|---|---|
| public static final XMLScanner. | |
| DOCTYPE | back to summary |
|---|---|
| public static final XMLScanner. | |
| ELEMENTEND | back to summary |
|---|---|
| public static final XMLScanner. | |
| ELEMENTSTART | back to summary |
|---|---|
| public static final XMLScanner. | |
| ENTITY | back to summary |
|---|---|
| public static final XMLScanner. | |
| literal | back to summary |
|---|---|
| pack-priv final String literal | |
| NOTATION | back to summary |
|---|---|
| public static final XMLScanner. | |
| PI | back to summary |
|---|---|
| public static final XMLScanner. | |
| REFERENCE | back to summary |
|---|---|
| public static final XMLScanner. | |
| NameType | back to summary |
|---|---|
| private NameType(String literal) | |
| literal | back to summary |
|---|---|
| pack-priv String literal() | |
| valueOf | back to summary |
|---|---|
| public static XMLScanner. | |
| values | back to summary |
|---|---|
| public static XMLScanner. | |