| java.lang.Object com.sun.xml.stream.XMLScanner com.sun.xml.stream.XMLDocumentFragmentScannerImpl com.sun.xml.stream.XMLDocumentScannerImpl com.sun.xml.stream.XMLNSDocumentScannerImpl
XMLNSDocumentScannerImpl | public class XMLNSDocumentScannerImpl extends XMLDocumentScannerImpl (Code) | | This class adds the functionality of namespace processing.
This class has been modified as per the new design which is more suited to
efficiently build pull parser. Lot of improvements have been done and
the code has been added to support stax functionality/features.
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.
author: Neeraj Bajaj, Sun Microsystems author: Venugopal Rao K, Sun Microsystems author: Elena Litani, IBM version: $Id: XMLNSDocumentScannerImpl.java,v 1.5 2006/11/29 22:01:30 spericas Exp $ |
Inner Class :final protected class NSContentDriver extends ContentDriver | |
Field Summary | |
protected boolean | fPerformValidation If validating parser, make sure we report an error in the
scanner if DTD grammar is missing. |
fPerformValidation | protected boolean fPerformValidation(Code) | | If validating parser, make sure we report an error in the
scanner if DTD grammar is missing.
|
createContentDriver | protected Driver createContentDriver()(Code) | | Creates a content driver.
|
getCharacterEncodingScheme | public String getCharacterEncodingScheme()(Code) | | |
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]. |
Methods inherited from com.sun.xml.stream.XMLDocumentFragmentScannerImpl | void addElement(String rawname)(Code)(Java Doc) boolean canStore(short depth, short column)(Code)(Java Doc) protected Driver createContentDriver()(Code)(Java Doc) public void endEntity(String name) throws IOException, XNIException(Code)(Java Doc) public XMLAttributesIteratorImpl getAttributeIterator()(Code)(Java Doc) public XMLString getCharacterData()(Code)(Java Doc) public String getComment()(Code)(Java Doc) public XMLDocumentHandler getDocumentHandler()(Code)(Java Doc) public String getDriverName(Driver driver)(Code)(Java Doc) short getElementPointer(short depth, short column)(Code)(Java Doc) public String getEntityName()(Code)(Java Doc) public Boolean getFeatureDefault(String featureId)(Code)(Java Doc) public XMLStringBuffer getPIData()(Code)(Java Doc) public String getPITarget()(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) public boolean hasAttributes()(Code)(Java Doc) public boolean isStandAlone()(Code)(Java Doc) public int next() throws IOException, XNIException(Code)(Java Doc) static void pr(String str)(Code)(Java Doc) public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)(Java Doc) public void reset(PropertyManager propertyManager)(Code)(Java Doc) void resetPointer(short depth, short column)(Code)(Java Doc) protected void scanAttribute(XMLAttributes attributes) throws IOException, XNIException(Code)(Java Doc) protected boolean scanCDATASection(XMLStringBuffer contentBuffer, 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(XMLStringBuffer content) 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(XMLStringBuffer content) throws IOException, XNIException(Code)(Java Doc) protected void scanPIData(String target, XMLStringBuffer data) throws IOException, XNIException(Code)(Java Doc) protected boolean scanStartElement() throws IOException, XNIException(Code)(Java Doc) protected void scanXMLDeclOrTextDecl(boolean scanningTextDecl) throws IOException, XNIException(Code)(Java Doc) public void setDocumentHandler(XMLDocumentHandler documentHandler)(Code)(Java Doc) final protected void setDriver(Driver driver)(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) protected boolean skipElement() throws IOException(Code)(Java Doc) boolean skipElement(short column) throws IOException(Code)(Java Doc) boolean skipFromTheBuffer(String rawname) throws IOException(Code)(Java Doc) boolean skipQElement(QName name) throws IOException(Code)(Java Doc) boolean skipQElement(String rawname) throws IOException(Code)(Java Doc) public void startEntity(String name, XMLResourceIdentifier identifier, String encoding) throws XNIException(Code)(Java Doc) short storePointerForADepth(short elementPointer)(Code)(Java Doc)
|
Methods inherited from com.sun.xml.stream.XMLScanner | public void endEntity(String name) throws IOException, XNIException(Code)(Java Doc) public boolean getFeature(String featureId) throws XMLConfigurationException(Code)(Java Doc) XMLStringBuffer getStringBuffer()(Code)(Java Doc) protected static boolean isInvalid(int value)(Code)(Java Doc) protected static boolean isInvalidLiteral(int value)(Code)(Java Doc) protected static boolean isValidNCName(int value)(Code)(Java Doc) protected static boolean isValidNameChar(int value)(Code)(Java Doc) protected static boolean isValidNameStartChar(int value)(Code)(Java Doc) protected void normalizeWhitespace(XMLString value)(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) public void reset(PropertyManager propertyManager)(Code)(Java Doc) protected void scanAttributeValue(XMLString value, XMLString nonNormalizedValue, String atName, XMLAttributes attributes, int attrIndex, boolean checkEntities) 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(XMLStringBuffer data) throws IOException, XNIException(Code)(Java Doc) protected void scanPIData(String target, XMLStringBuffer 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) protected void setPropertyManager(PropertyManager propertyManager)(Code)(Java Doc) public void startEntity(String name, XMLResourceIdentifier identifier, String encoding) throws XNIException(Code)(Java Doc) protected boolean versionSupported(String version)(Code)(Java Doc)
|
|
|