|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.xerces.impl.XMLScanner | +--org.apache.xerces.impl.XMLDocumentFragmentScannerImpl | +--org.apache.xerces.impl.XMLDocumentScannerImpl | +--org.apache.xerces.impl.XML11DocumentScannerImpl | +--org.apache.xerces.impl.XML11NSDocumentScannerImpl
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:
Inner Class Summary | |
protected class |
XML11NSDocumentScannerImpl.NS11ContentDispatcher
Dispatcher to handle content scanning. |
Inner classes inherited from class org.apache.xerces.impl.XMLDocumentScannerImpl |
XMLDocumentScannerImpl.ContentDispatcher, XMLDocumentScannerImpl.DTDDispatcher, XMLDocumentScannerImpl.PrologDispatcher, XMLDocumentScannerImpl.TrailingMiscDispatcher, XMLDocumentScannerImpl.XMLDeclDispatcher |
Inner classes inherited from class org.apache.xerces.impl.XMLDocumentFragmentScannerImpl |
XMLDocumentFragmentScannerImpl.Dispatcher, XMLDocumentFragmentScannerImpl.ElementStack, XMLDocumentFragmentScannerImpl.FragmentContentDispatcher |
Field Summary | |
protected boolean |
fBindNamespaces
If is true, the dtd validator is no longer in the pipeline and the scanner should bind namespaces |
protected boolean |
fPerformValidation
If validating parser, make sure we report an error in the scanner if DTD grammar is missing. |
Fields inherited from class org.apache.xerces.impl.XMLScanner |
DEBUG_ATTR_NORMALIZATION, ENTITY_MANAGER, ERROR_REPORTER, fAmpSymbol, fAposSymbol, fCharRefLiteral, fEncodingSymbol, fEntityDepth, fEntityManager, fEntityScanner, fErrorReporter, fGtSymbol, fLtSymbol, fNamespaces, fNotifyCharRefs, fParserSettings, fQuotSymbol, fReportEntity, fResourceIdentifier, fScanningAttribute, fStandaloneSymbol, fSymbolTable, fValidation, fVersionSymbol, NOTIFY_CHAR_REFS, PARSER_SETTINGS, SYMBOL_TABLE, VALIDATION |
Constructor Summary | |
XML11NSDocumentScannerImpl()
|
Method Summary | |
protected XMLDocumentFragmentScannerImpl.Dispatcher |
createContentDispatcher()
Creates a content dispatcher. |
void |
reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager)
Resets the component. |
protected void |
scanAttribute(XMLAttributesImpl attributes)
Scans an attribute. |
protected int |
scanEndElement()
Scans an end element. |
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. |
void |
setDTDValidator(XMLDTDValidatorFilter validator)
The scanner is responsible for removing DTD validator from the pipeline if it is not needed. |
Methods inherited from class org.apache.xerces.impl.XML11DocumentScannerImpl |
getVersionNotSupportedKey, isInvalid, isInvalidLiteral, isUnchangedByNormalization, isValidNameChar, isValidNameStartChar, isValidNameStartHighSurrogate, isValidNCName, normalizeWhitespace, normalizeWhitespace, scanAttributeValue, scanContent, scanPubidLiteral, versionSupported |
Methods inherited from class org.apache.xerces.impl.XMLDocumentScannerImpl |
endEntity, getFeatureDefault, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, getScannerStateName, scanDoctypeDecl, setFeature, setInputSource, setProperty, startEntity |
Methods inherited from class org.apache.xerces.impl.XMLDocumentFragmentScannerImpl |
getDispatcherName, getDocumentHandler, handleEndElement, scanAttribute, scanCDATASection, scanCharReference, scanComment, scanDocument, scanEntityReference, scanPIData, scanXMLDeclOrTextDecl, setDispatcher, setDocumentHandler, setScannerState |
Methods inherited from class org.apache.xerces.impl.XMLScanner |
getFeature, reportFatalError, reset, scanCharReferenceValue, scanComment, scanExternalID, scanPI, scanPseudoAttribute, scanSurrogates, scanXMLDeclOrTextDecl |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected boolean fBindNamespaces
protected boolean fPerformValidation
Constructor Detail |
public XML11NSDocumentScannerImpl()
Method Detail |
public void setDTDValidator(XMLDTDValidatorFilter validator)
validator
- the DTD validator from the pipelineprotected boolean scanStartElement() throws java.io.IOException, org.apache.xerces.xni.XNIException
[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.
scanStartElement
in class XMLDocumentFragmentScannerImpl
protected void scanStartElementName() throws java.io.IOException, org.apache.xerces.xni.XNIException
scanStartElementName
in class XMLDocumentFragmentScannerImpl
scanStartElement()
protected boolean scanStartElementAfterName() throws java.io.IOException, org.apache.xerces.xni.XNIException
scanStartElementAfterName
in class XMLDocumentFragmentScannerImpl
scanStartElement()
protected void scanAttribute(XMLAttributesImpl attributes) throws java.io.IOException, org.apache.xerces.xni.XNIException
[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.
attributes
- The attributes list for the scanned attribute.protected int scanEndElement() throws java.io.IOException, org.apache.xerces.xni.XNIException
[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.
scanEndElement
in class XMLDocumentFragmentScannerImpl
public void reset(org.apache.xerces.xni.parser.XMLComponentManager componentManager) throws org.apache.xerces.xni.parser.XMLConfigurationException
XMLDocumentScannerImpl
reset
in class XMLDocumentScannerImpl
org.apache.xerces.impl.XMLDocumentScannerImpl
componentManager
- The component manager.SAXException
- Thrown by component on initialization error.
For example, if a feature or property is
required for the operation of the component, the
component manager may throw a
SAXNotRecognizedException or a
SAXNotSupportedException.protected XMLDocumentFragmentScannerImpl.Dispatcher createContentDispatcher()
createContentDispatcher
in class XMLDocumentScannerImpl
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |