| java.lang.Object org.apache.xerces.impl.XMLScanner org.apache.xerces.impl.XMLDocumentFragmentScannerImpl org.apache.xerces.impl.XMLDocumentScannerImpl org.apache.xerces.impl.XML11DocumentScannerImpl
All known Subclasses: org.apache.xerces.impl.XML11NSDocumentScannerImpl,
XML11DocumentScannerImpl | public class XML11DocumentScannerImpl extends XMLDocumentScannerImpl (Code) | | This class is responsible for scanning XML document structure
and content. The scanner acts as the source for the document
information which is communicated to the document handler.
This component requires the following features and properties from the
component manager that uses it:
- http://xml.org/sax/features/namespaces
- http://xml.org/sax/features/validation
- http://apache.org/xml/features/nonvalidating/load-external-dtd
- http://apache.org/xml/features/scanner/notify-char-refs
- http://apache.org/xml/features/scanner/notify-builtin-refs
- http://apache.org/xml/properties/internal/symbol-table
- http://apache.org/xml/properties/internal/error-reporter
- http://apache.org/xml/properties/internal/entity-manager
- http://apache.org/xml/properties/internal/dtd-scanner
author: Glenn Marcy, IBM author: Andy Clark, IBM author: Arnaud Le Hors, IBM author: Eric Ye, IBM version: $Id: XML11DocumentScannerImpl.java 572055 2007-09-02 17:55:43Z mrglavas $ |
Method Summary | |
protected String | getVersionNotSupportedKey() | protected boolean | isInvalid(int value) | protected boolean | isInvalidLiteral(int value) | protected int | isUnchangedByNormalization(XMLString value) Checks whether this string would be unchanged by normalization. | protected boolean | isValidNCName(int value) | protected boolean | isValidNameChar(int value) | protected boolean | isValidNameStartChar(int value) | protected boolean | isValidNameStartHighSurrogate(int value) | 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 boolean | scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, boolean checkEntities, String eleName) Scans an attribute value and normalizes whitespace converting all
whitespace characters to space characters.
[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
Parameters: value - The XMLString to fill in with the value. Parameters: nonNormalizedValue - The XMLString to fill in with the non-normalized value. Parameters: atName - The name of the attribute being parsed (for error msgs). Parameters: checkEntities - true if undeclared entities should be reported as VC violation, false if undeclared entities should be reported as WFC violation. Parameters: eleName - The name of element to which this attribute belongs. | protected int | scanContent() Scans element content. | protected boolean | scanPubidLiteral(XMLString literal) 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.
Parameters: literal - The string to fill in with the public ID literal. | protected boolean | versionSupported(String version) |
XML11DocumentScannerImpl | public XML11DocumentScannerImpl()(Code) | | Default constructor.
|
getVersionNotSupportedKey | protected String getVersionNotSupportedKey()(Code) | | |
isInvalid | protected boolean isInvalid(int value)(Code) | | |
isInvalidLiteral | protected boolean isInvalidLiteral(int value)(Code) | | |
isUnchangedByNormalization | protected int isUnchangedByNormalization(XMLString value)(Code) | | Checks whether this string would be unchanged by normalization.
-1 if the value would be unchanged by normalization,otherwise the index of the first whitespace character whichwould be transformed. |
isValidNCName | protected boolean isValidNCName(int value)(Code) | | |
isValidNameChar | protected boolean isValidNameChar(int value)(Code) | | |
isValidNameStartChar | protected boolean isValidNameStartChar(int value)(Code) | | |
isValidNameStartHighSurrogate | protected boolean isValidNameStartHighSurrogate(int value)(Code) | | |
normalizeWhitespace | protected void normalizeWhitespace(XMLString value)(Code) | | Normalize whitespace in an XMLString converting all whitespace
characters to space characters.
|
normalizeWhitespace | protected void normalizeWhitespace(XMLString value, int fromIndex)(Code) | | Normalize whitespace in an XMLString converting all whitespace
characters to space characters.
|
scanAttributeValue | protected boolean scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, boolean checkEntities, String eleName) throws IOException, XNIException(Code) | | Scans an attribute value and normalizes whitespace converting all
whitespace characters to space characters.
[10] AttValue ::= '"' ([^<&"] | Reference)* '"' | "'" ([^<&'] | Reference)* "'"
Parameters: value - The XMLString to fill in with the value. Parameters: nonNormalizedValue - The XMLString to fill in with the non-normalized value. Parameters: atName - The name of the attribute being parsed (for error msgs). Parameters: checkEntities - true if undeclared entities should be reported as VC violation, false if undeclared entities should be reported as WFC violation. Parameters: eleName - The name of element to which this attribute belongs. true if the non-normalized and normalized value are the sameNote: This method uses fStringBuffer2, anything in itat the time of calling is lost. |
scanPubidLiteral | protected boolean scanPubidLiteral(XMLString literal) throws IOException, XNIException(Code) | | 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.
Parameters: literal - The string to fill in with the public ID literal. True on success.Note: This method uses fStringBuffer, anything in it atthe time of calling is lost. |
versionSupported | protected boolean versionSupported(String version)(Code) | | |
Methods inherited from org.apache.xerces.impl.XMLDocumentFragmentScannerImpl | protected Dispatcher createContentDispatcher()(Code)(Java Doc) public void endEntity(String name, Augmentations augs) throws XNIException(Code)(Java Doc) public String getDispatcherName(Dispatcher dispatcher)(Code)(Java Doc) public XMLDocumentHandler getDocumentHandler()(Code)(Java Doc) public Boolean getFeatureDefault(String featureId)(Code)(Java Doc) public Object getPropertyDefault(String propertyId)(Code)(Java Doc) public String[] getRecognizedFeatures()(Code)(Java Doc) public String[] getRecognizedProperties()(Code)(Java Doc) protected String getScannerStateName(int state)(Code)(Java Doc) protected int handleEndElement(QName element, boolean isEmpty) throws XNIException(Code)(Java Doc) public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)(Java Doc) protected void scanAttribute(XMLAttributes attributes) throws IOException, XNIException(Code)(Java Doc) protected boolean scanCDATASection(boolean complete) throws IOException, XNIException(Code)(Java Doc) protected void scanCharReference() throws IOException, XNIException(Code)(Java Doc) protected void scanComment() throws IOException, XNIException(Code)(Java Doc) protected int scanContent() throws IOException, XNIException(Code)(Java Doc) public boolean scanDocument(boolean complete) throws IOException, XNIException(Code)(Java Doc) protected int scanEndElement() throws IOException, XNIException(Code)(Java Doc) protected void scanEntityReference() throws IOException, XNIException(Code)(Java Doc) protected void scanPIData(String target, XMLString data) throws IOException, XNIException(Code)(Java Doc) protected boolean scanStartElement() throws IOException, XNIException(Code)(Java Doc) protected boolean scanStartElementAfterName() throws IOException, XNIException(Code)(Java Doc) protected void scanStartElementName() throws IOException, XNIException(Code)(Java Doc) protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl) throws IOException, XNIException(Code)(Java Doc) final protected void setDispatcher(Dispatcher dispatcher)(Code)(Java Doc) public void setDocumentHandler(XMLDocumentHandler documentHandler)(Code)(Java Doc) public void setFeature(String featureId, boolean state) throws XMLConfigurationException(Code)(Java Doc) public void setInputSource(XMLInputSource inputSource) throws IOException(Code)(Java Doc) public void setProperty(String propertyId, Object value) throws XMLConfigurationException(Code)(Java Doc) final protected void setScannerState(int state)(Code)(Java Doc) public void startEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException(Code)(Java Doc)
|
Methods inherited from org.apache.xerces.impl.XMLScanner | public void endEntity(String name, Augmentations augs) throws XNIException(Code)(Java Doc) public boolean getFeature(String featureId) throws XMLConfigurationException(Code)(Java Doc) protected String getVersionNotSupportedKey()(Code)(Java Doc) protected boolean isInvalid(int value)(Code)(Java Doc) protected boolean isInvalidLiteral(int value)(Code)(Java Doc) protected int isUnchangedByNormalization(XMLString value)(Code)(Java Doc) protected boolean isValidNCName(int value)(Code)(Java Doc) protected boolean isValidNameChar(int value)(Code)(Java Doc) protected boolean isValidNameStartChar(int value)(Code)(Java Doc) protected boolean isValidNameStartHighSurrogate(int value)(Code)(Java Doc) protected void normalizeWhitespace(XMLString value)(Code)(Java Doc) protected void normalizeWhitespace(XMLString value, int fromIndex)(Code)(Java Doc) protected void reportFatalError(String msgId, Object[] args) throws XNIException(Code)(Java Doc) public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)(Java Doc) protected void reset()(Code)(Java Doc) protected boolean scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, boolean checkEntities, String eleName) throws IOException, XNIException(Code)(Java Doc) protected int scanCharReferenceValue(XMLStringBuffer buf, XMLStringBuffer buf2) throws IOException, XNIException(Code)(Java Doc) protected void scanComment(XMLStringBuffer text) throws IOException, XNIException(Code)(Java Doc) protected void scanExternalID(String[] identifiers, boolean optionalSystemId) throws IOException, XNIException(Code)(Java Doc) protected void scanPI() throws IOException, XNIException(Code)(Java Doc) protected void scanPIData(String target, XMLString data) throws IOException, XNIException(Code)(Java Doc) public String scanPseudoAttribute(boolean scanningTextDecl, XMLString value) throws IOException, XNIException(Code)(Java Doc) protected boolean scanPubidLiteral(XMLString literal) throws IOException, XNIException(Code)(Java Doc) protected boolean scanSurrogates(XMLStringBuffer buf) throws IOException, XNIException(Code)(Java Doc) protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl, String[] pseudoAttributeValues) throws IOException, XNIException(Code)(Java Doc) public void setFeature(String featureId, boolean value) throws XMLConfigurationException(Code)(Java Doc) public void setProperty(String propertyId, Object value) throws XMLConfigurationException(Code)(Java Doc) public void startEntity(String name, XMLResourceIdentifier identifier, String encoding, Augmentations augs) throws XNIException(Code)(Java Doc) protected boolean versionSupported(String version)(Code)(Java Doc)
|
|
|