Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
gnu.xml.pipeline.DomConsumer.Handler
gnu.xml.dom.Consumer.Backdoor
public static class Consumer.Backdoor
extends DomConsumer.Handler
Field Summary |
Fields inherited from class gnu.xml.pipeline.DomConsumer.Handler | |
consumer |
Constructor Summary | |
|
Method Summary | |
void | |
boolean |
|
protected Text |
|
void |
|
void |
|
void | |
void |
|
void | |
void |
|
void |
|
void |
|
void | |
void | |
void |
|
void |
|
void |
|
Methods inherited from class gnu.xml.pipeline.DomConsumer.Handler | |
attributeDecl , canPopulateEntityRefs , characters , comment , createText , elementDecl , endCDATA , endDTD , endDocument , endElement , endEntity , endPrefixMapping , externalEntityDecl , getDocument , getTop , ignorableWhitespace , internalEntityDecl , notationDecl , processingInstruction , setDocumentLocator , skippedEntity , startCDATA , startDTD , startDocument , startElement , startEntity , startPrefixMapping , unparsedEntityDecl |
Methods inherited from class java.lang.Object | |
clone , equals , extends Object> getClass , finalize , hashCode , notify , notifyAll , toString , wait , wait , wait |
protected Backdoor(DomConsumer consumer) throws SAXException
Constructor.
- Parameters:
consumer
- must have been initialized to use theDomDocument
class (or a subclass) for constructing DOM trees
public void attributeDecl(String ename, String aname, String type, String mode, String value) throws SAXException
- Specified by:
- attributeDecl in interface DeclHandler
- Overrides:
- attributeDecl in interface DomConsumer.Handler
public boolean canPopulateEntityRefs()
May be overridden by subclasses to return true, indicating that entity reference nodes can be populated and then made read-only.
- Overrides:
- canPopulateEntityRefs in interface DomConsumer.Handler
public void elementDecl(String name, String model) throws SAXException
- Specified by:
- elementDecl in interface DeclHandler
- Overrides:
- elementDecl in interface DomConsumer.Handler
public void endDTD() throws SAXException
Report the end of DTD declarations. This method is intended to report the end of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked.
- Specified by:
- endDTD in interface LexicalHandler
- Overrides:
- endDTD in interface DomConsumer.Handler
- Throws:
SAXException
- The application may raise an exception.
public void endDocument() throws SAXException
- Specified by:
- endDocument in interface ContentHandler
- Overrides:
- endDocument in interface DomConsumer.Handler
public void endElement(String uri, String localName, String qName) throws SAXException
- Specified by:
- endElement in interface ContentHandler
- Overrides:
- endElement in interface DomConsumer.Handler
public void endEntity(String name) throws SAXException
Report the end of an entity.
- Specified by:
- endEntity in interface LexicalHandler
- Overrides:
- endEntity in interface DomConsumer.Handler
- Parameters:
name
- The name of the entity that is ending.
- Throws:
SAXException
- The application may raise an exception.
- See Also:
LexicalHandler.startEntity(String)
public void externalEntityDecl(String name, String publicId, String systemId) throws SAXException
- Specified by:
- externalEntityDecl in interface DeclHandler
- Overrides:
- externalEntityDecl in interface DomConsumer.Handler
public void internalEntityDecl(String name, String value) throws SAXException
- Specified by:
- internalEntityDecl in interface DeclHandler
- Overrides:
- internalEntityDecl in interface DomConsumer.Handler
public void notationDecl(String name, String publicId, String systemId) throws SAXException
- Specified by:
- notationDecl in interface DTDHandler
- Overrides:
- notationDecl in interface DomConsumer.Handler
public void startDTD(String name, String publicId, String systemId) throws SAXException
Report the start of DTD declarations, if any. This method is intended to report the beginning of the DOCTYPE declaration; if the document has no DOCTYPE declaration, this method will not be invoked. All declarations reported throughDTDHandler
orDeclHandler
events must appear between the startDTD andendDTD
events. Declarations are assumed to belong to the internal DTD subset unless they appear betweenstartEntity
andendEntity
events. Comments and processing instructions from the DTD should also be reported between the startDTD and endDTD events, in their original order of (logical) occurrence; they are not required to appear in their correct locations relative to DTDHandler or DeclHandler events, however. Note that the start/endDTD events will appear within the start/endDocument events from ContentHandler and before the firststartElement
event.
- Specified by:
- startDTD in interface LexicalHandler
- Overrides:
- startDTD in interface DomConsumer.Handler
- Parameters:
name
- The document type name.publicId
- The declared public identifier for the external DTD subset, or null if none was declared.systemId
- The declared system identifier for the external DTD subset, or null if none was declared. (Note that this is not resolved against the document base URI.)
- Throws:
SAXException
- The application may raise an exception.
public void startDocument() throws SAXException
- Specified by:
- startDocument in interface ContentHandler
- Overrides:
- startDocument in interface DomConsumer.Handler
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException
- Specified by:
- startElement in interface ContentHandler
- Overrides:
- startElement in interface DomConsumer.Handler
public void startEntity(String name) throws SAXException
Report the beginning of some internal and external XML entities. The reporting of parameter entities (including the external DTD subset) is optional, and SAX2 drivers that report LexicalHandler events may not implement it; you can use thehttp://xml.org/sax/features/lexical-handler/parameter-entities
feature to query or control the reporting of parameter entities. General entities are reported with their regular names, parameter entities have '%' prepended to their names, and the external DTD subset has the pseudo-entity name "[dtd]". When a SAX2 driver is providing these events, all other events must be properly nested within start/end entity events. There is no additional requirement that events fromDeclHandler
orDTDHandler
be properly ordered. Note that skipped entities will be reported through theskippedEntity
event, which is part of the ContentHandler interface. Because of the streaming event model that SAX uses, some entity boundaries cannot be reported under any circumstances:These will be silently expanded, with no indication of where the original entity boundaries were. Note also that the boundaries of character references (which are not really entities anyway) are not reported. All start/endEntity events must be properly nested.
- general entities within attribute values
- parameter entities within declarations
- Specified by:
- startEntity in interface LexicalHandler
- Overrides:
- startEntity in interface DomConsumer.Handler
- Parameters:
name
- The name of the entity. If it is a parameter entity, the name will begin with '%', and if it is the external DTD subset, it will be "[dtd]".
- Throws:
SAXException
- The application may raise an exception.
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException
- Specified by:
- unparsedEntityDecl in interface DTDHandler
- Overrides:
- unparsedEntityDecl in interface DomConsumer.Handler