This component requires the following features and properties from the component manager that uses it:
| Modifier and Type | Field and Description |
|---|---|
| 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 String | fCharRefLiteral
Literal value of the last character refence scanned. |
| protected static final String | fEncodingSymbol
Symbol: "encoding". |
| protected int | fEntityDepth
Entity depth. |
| protected XMLEntityManager | fEntityManager
Entity manager. |
| protected XMLEntityScanner | fEntityScanner
Entity scanner. |
| protected XMLErrorReporter | fErrorReporter
Error reporter. |
| protected static final String | fGtSymbol
Symbol: "gt". |
| protected static final String | fLtSymbol
Symbol: "lt". |
| protected boolean | fNamespaces
Namespaces. |
| protected boolean | fNotifyCharRefs
Character references notification. |
| protected boolean | fParserSettings
Internal parser-settings feature |
| protected static final String | fQuotSymbol
Symbol: "quot". |
| protected boolean | fReportEntity
Report entity boundary. |
| protected final XMLResourceIdentifierImpl | |
| protected boolean | fScanningAttribute
Scanning attribute. |
| protected static final String | fStandaloneSymbol
Symbol: "standalone". |
| private final XMLString | fString
String. |
| private final XMLStringBuffer | fStringBuffer
String buffer. |
| private final XMLStringBuffer | fStringBuffer2
String buffer. |
| private final XMLStringBuffer | fStringBuffer3
String buffer. |
| protected SymbolTable | fSymbolTable
Symbol table. |
| protected boolean | fValidation
Validation. |
| protected static final String | fVersionSymbol
Symbol: "version". |
| protected static final String | NAMESPACES
Feature identifier: namespaces. |
| protected static final String | NOTIFY_CHAR_REFS
Feature identifier: notify character references. |
| protected static final String | |
| 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 |
|---|---|
| public void | endEntity(String
The name of the entity. name, Augmentations Additional information that may include infoset augmentations augs)This method notifies the end of an entity. |
| public boolean | |
| protected String | |
| private void | |
| protected boolean | |
| protected boolean | |
| protected int | Returns: -1 if the value would be unchanged by normalization, otherwise the index of the first whitespace character which would be transformed.Checks whether this string would be unchanged by normalization. |
| 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 | normalizeWhitespace(XMLString value, int fromIndex)
Normalize whitespace in an XMLString converting all whitespace characters to space characters. |
| protected void | |
| public void | reset(XMLComponentManager
The component manager. componentManager)Implements org. |
| protected void | |
| protected boolean | Returns: true if the non-normalized and normalized value are the sameNote This method uses fStringBuffer2, anything in it at the time of calling is lost. 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, 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)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, XMLString The string to fill in with the data data)Scans a processing data. |
| public 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
The feature identifier. featureId, boolean The state of the feature. value)Implements org. |
| public void | setProperty(String propertyId, Object value)
Implements org. |
| 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 Additional information that may include infoset augmentations augs)This method notifies of the start of an entity. |
| protected boolean |
| 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". | |
| fCharRefLiteral | back to summary |
|---|---|
| protected String fCharRefLiteral Literal value of the last character refence 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. | |
| fErrorReporter | back to summary |
|---|---|
| protected XMLErrorReporter fErrorReporter Error reporter. | |
| fGtSymbol | back to summary |
|---|---|
| protected static final String fGtSymbol Symbol: "gt". | |
| fLtSymbol | back to summary |
|---|---|
| protected static final String fLtSymbol Symbol: "lt". | |
| fNamespaces | back to summary |
|---|---|
| protected boolean fNamespaces Namespaces. | |
| fNotifyCharRefs | back to summary |
|---|---|
| protected boolean fNotifyCharRefs Character references notification. | |
| fParserSettings | back to summary |
|---|---|
| protected boolean fParserSettings Internal parser-settings feature | |
| 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 final XMLResourceIdentifierImpl fResourceIdentifier | |
| fScanningAttribute | back to summary |
|---|---|
| protected boolean fScanningAttribute Scanning attribute. | |
| fStandaloneSymbol | back to summary |
|---|---|
| protected static final String fStandaloneSymbol Symbol: "standalone". | |
| fString | back to summary |
|---|---|
| private final XMLString fString String. | |
| fStringBuffer | back to summary |
|---|---|
| private final XMLStringBuffer fStringBuffer String buffer. | |
| fStringBuffer2 | back to summary |
|---|---|
| private final XMLStringBuffer fStringBuffer2 String buffer. | |
| fStringBuffer3 | back to summary |
|---|---|
| private final XMLStringBuffer fStringBuffer3 String buffer. | |
| 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". | |
| 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 | |
| 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() | |
| endEntity | back to summary |
|---|---|
| public void endEntity(String name, Augmentations augs) throws 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 | |
| getVersionNotSupportedKey | back to summary |
|---|---|
| protected String getVersionNotSupportedKey() | |
| 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) | |
| isUnchangedByNormalization | back to summary |
|---|---|
| protected int isUnchangedByNormalization(XMLString value) Checks whether this string would be unchanged by normalization.
| |
| 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. | |
| normalizeWhitespace | back to summary |
|---|---|
| protected void normalizeWhitespace(XMLString value, int fromIndex) 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 org. Doc from org. 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() | |
| scanAttributeValue | back to summary |
|---|---|
| protected boolean scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, boolean checkEntities, String eleName) 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() throws IOException, XNIException Scans a processing instruction.
[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. | |
| scanPIData | back to summary |
|---|---|
| protected void scanPIData(String target, XMLString 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) Note This method uses fStringBuffer, anything in it at the time of calling is lost. | |
| scanPseudoAttribute | back to summary |
|---|---|
| public 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 org. Doc from org. 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 org. Sets the value of a property during parsing.
| |
| 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) | |