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:
Modifier and Type | Class and Description |
---|---|
protected class | XML11NSDocumentScannerImpl.
Driver to handle content scanning. |
Modifier and Type | Field and Description |
---|---|
protected boolean | fBindNamespaces
If is true, the dtd validator is no longer in the pipeline and the scanner should bind namespaces |
private XMLDTDValidatorFilter | fDTDValidator
DTD validator |
protected boolean | fPerformValidation
If validating parser, make sure we report an error in the scanner if DTD grammar is missing. |
private boolean | fSawSpace
Saw spaces after element name or between attributes. |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
protected XMLDocumentFragmentScannerImpl. | createContentDriver()
Overrides com. Creates a content Driver. |
public int | Returns: intOverrides com. Implements com. return the next state on the input |
public void | reset(XMLComponentManager
The component manager. componentManager)Overrides com. Implements com. Resets the component. |
protected void | scanAttribute(XMLAttributesImpl
The attributes list for the scanned attribute. attributes)Scans an attribute. |
protected int | Returns: The element depth.Overrides com. Scans an end element. |
protected boolean | Returns: True if element is empty. (i.e. It matches production [44].Overrides com. Scans a start element. |
protected boolean | Returns: True if element is empty.Scans the remainder of a start or empty tag after the element name. |
protected void | |
public void | setDTDValidator(XMLDTDValidatorFilter
the DTD validator from the pipeline validator)The scanner is responsible for removing DTD validator from the pipeline if it is not needed. |
fBindNamespaces | back to summary |
---|---|
protected boolean fBindNamespaces If is true, the dtd validator is no longer in the pipeline and the scanner should bind namespaces |
fDTDValidator | back to summary |
---|---|
private XMLDTDValidatorFilter fDTDValidator DTD validator |
fPerformValidation | back to summary |
---|---|
protected boolean fPerformValidation If validating parser, make sure we report an error in the scanner if DTD grammar is missing. |
fSawSpace | back to summary |
---|---|
private boolean fSawSpace Saw spaces after element name or between attributes. This is reserved for the case where scanning of a start element spans several methods, as is the case when scanning the start of a root element where a DTD external subset may be read after scanning the element name. |
XML11NSDocumentScannerImpl | back to summary |
---|---|
public XML11NSDocumentScannerImpl() |
createContentDriver | back to summary |
---|---|
protected XMLDocumentFragmentScannerImpl. Overrides com. Creates a content Driver. |
next | back to summary |
---|---|
public int next() throws IOException, XNIException Overrides com. Implements com. return the next state on the input
|
reset | back to summary |
---|---|
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException Overrides com. Implements com. Doc from com. Resets the component. The component can query the component manager about any features and properties that affect the operation of the component.
|
scanAttribute | back to summary |
---|---|
protected void scanAttribute(XMLAttributesImpl attributes) throws IOException, XNIException 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.
|
scanEndElement | back to summary |
---|---|
protected int scanEndElement() throws IOException, XNIException Overrides com. 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.
|
scanStartElement | back to summary |
---|---|
protected boolean scanStartElement() throws IOException, XNIException Overrides com. 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.
|
scanStartElementAfterName | back to summary |
---|---|
protected boolean scanStartElementAfterName() throws IOException, XNIException Scans the remainder of a start or empty tag after the element name.
|
scanStartElementName | back to summary |
---|---|
protected void scanStartElementName() throws IOException, XNIException Scans the name of an element in a start or empty tag.
|
setDTDValidator | back to summary |
---|---|
public void setDTDValidator(XMLDTDValidatorFilter validator) The scanner is responsible for removing DTD validator from the pipeline if it is not needed.
|
Access | Constructor and Description |
---|---|
protected |
Modifier and Type | Method and Description |
---|---|
private void | |
protected boolean | Returns: True if the caller should stop and return true which allows the scanner to switch to a new scanning Driver. A return value of false indicates that the content Driver should continue as normal.Overrides com. Scan for root element hook. |
NS11ContentDriver | back to summary |
---|---|
protected NS11ContentDriver() |
reconfigurePipeline | back to summary |
---|---|
private void reconfigurePipeline() Re-configures pipeline by removing the DTD validator if no DTD grammar exists. If no validator exists in the pipeline or there is no DTD grammar, namespace binding is performed by the scanner in the enclosing class. |
scanRootElementHook | back to summary |
---|---|
protected boolean scanRootElementHook() throws IOException, XNIException Overrides com. Scan for root element hook. This method is a hook for subclasses to add code that handles scanning for the root element. This method will also attempt to remove DTD validator from the pipeline, if there is no DTD grammar. If DTD validator is no longer in the pipeline bind namespaces in the scanner.
|