| java.lang.Object org.apache.xerces.impl.XMLScanner org.apache.xerces.impl.XMLDocumentFragmentScannerImpl org.apache.xerces.impl.XMLDocumentScannerImpl org.apache.xerces.impl.XMLNSDocumentScannerImpl
XMLNSDocumentScannerImpl | public class XMLNSDocumentScannerImpl extends XMLDocumentScannerImpl (Code) | | The scanner acts as the source for the document
information which is communicated to the document handler.
This class scans an XML document, checks if document has a DTD, and if
DTD is not found the scanner will remove the DTD Validator from the pipeline and perform
namespace binding.
Note: This scanner should only be used when the namespace processing is on!
This component requires the following features and properties from the
component manager that uses it:
- http://xml.org/sax/features/namespaces {true} -- if the value of this
feature is set to false this scanner must not be used.
- 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: Elena Litani, IBM version: $Id: XMLNSDocumentScannerImpl.java 495747 2007-01-12 21:48:00Z mrglavas $ |
Inner Class :final protected class NSContentDispatcher extends ContentDispatcher | |
Field Summary | |
protected boolean | fBindNamespaces | protected boolean | fPerformValidation If validating parser, make sure we report an error in the
scanner if DTD grammar is missing. |
Method Summary | |
protected Dispatcher | createContentDispatcher() Creates a content dispatcher. | public void | reset(XMLComponentManager componentManager) | protected void | scanAttribute(XMLAttributesImpl attributes) Scans an attribute.
[41] Attribute ::= Name Eq AttValue
Note: This method assumes that the next
character on the stream is the first character of the attribute
name.
Note: This method uses the fAttributeQName and
fQName variables. | protected int | scanEndElement() Scans an end element.
[42] ETag ::= '</' Name S? '>'
Note: This method uses the fElementQName variable.
The contents of this variable will be destroyed. | protected boolean | scanStartElement() Scans a start element. | protected boolean | scanStartElementAfterName() Scans the remainder of a start or empty tag after the element name. | protected void | scanStartElementName() Scans the name of an element in a start or empty tag. | public void | setDTDValidator(XMLDTDValidatorFilter dtdValidator) The scanner is responsible for removing DTD validator
from the pipeline if it is not needed. |
fBindNamespaces | protected boolean fBindNamespaces(Code) | | If is true, the dtd validator is no longer in the pipeline
and the scanner should bind namespaces
|
fPerformValidation | protected boolean fPerformValidation(Code) | | If validating parser, make sure we report an error in the
scanner if DTD grammar is missing.
|
createContentDispatcher | protected Dispatcher createContentDispatcher()(Code) | | Creates a content dispatcher.
|
scanAttribute | protected void scanAttribute(XMLAttributesImpl attributes) throws IOException, XNIException(Code) | | Scans an attribute.
[41] Attribute ::= Name Eq AttValue
Note: This method assumes that the next
character on the stream is the first character of the attribute
name.
Note: This method uses the fAttributeQName and
fQName variables. The contents of these variables will be
destroyed.
Parameters: attributes - The attributes list for the scanned attribute. |
scanEndElement | protected int scanEndElement() throws IOException, XNIException(Code) | | Scans an end element.
[42] ETag ::= '</' Name S? '>'
Note: This method uses the fElementQName variable.
The contents of this variable will be destroyed. The caller should
copy the needed information out of this variable before calling
this method.
The element depth. |
scanStartElement | protected boolean scanStartElement() throws IOException, XNIException(Code) | | Scans a start element. This method will handle the binding of
namespace information and notifying the handler of the start
of the element.
[44] EmptyElemTag ::= '<' Name (S Attribute)* S? '/>'
[40] STag ::= '<' Name (S Attribute)* S? '>'
Note: This method assumes that the leading
'<' character has been consumed.
Note: This method uses the fElementQName and
fAttributes variables. The contents of these variables will be
destroyed. The caller should copy important information out of
these variables before calling this method.
True if element is empty. (i.e. It matchesproduction [44]. |
setDTDValidator | public void setDTDValidator(XMLDTDValidatorFilter dtdValidator)(Code) | | The scanner is responsible for removing DTD validator
from the pipeline if it is not needed.
Parameters: dtdValidator - The DTDValidator |
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)
|
|
|