Top Description Constructors Methods
com.sun.xml.dtdparser

public Class DTDHandlerBase

extends Object
implements DTDEventListener
Class Inheritance
All Implemented Interfaces
com.sun.xml.dtdparser.DTDEventListener, java.util.EventListener
Known Direct Subclasses
com.sun.tools.xjc.reader.dtd.TDTDReader
Imports
org.xml.sax.Locator, .SAXException, .SAXParseException

do-nothing implementation of DTDEventHandler.

Constructor Summary

AccessConstructor and Description
public
DTDHandlerBase()

Constructs a DTDHandlerBase.

Method Summary

Modifier and TypeMethod and Description
public void
attributeDecl(String elementName, String attributeName, String attributeType, String[] enumeration, short attributeUse, String defaultValue)

Implements com.sun.xml.dtdparser.DTDEventListener.attributeDecl.

For each entry in an ATTLIST declaration, this event will be fired.

public void
characters(char[] ch, int start, int length)

Implements com.sun.xml.dtdparser.DTDEventListener.characters.

Receive notification of character data.

public void
public void
comment(String n)

Implements com.sun.xml.dtdparser.DTDEventListener.comment.

Receive notification that a comment has been read.

public void
connector(short connectorType)

Implements com.sun.xml.dtdparser.DTDEventListener.connector.

Connectors in one model group is guaranteed to be the same.

public void
endCDATA()

Implements com.sun.xml.dtdparser.DTDEventListener.endCDATA.

Receive notification that the CDATA section finished.

public void
endContentModel(String elementName, short contentModelType)

Implements com.sun.xml.dtdparser.DTDEventListener.endContentModel.

receives notification that parsing of content model is finished.

public void
endDTD()

Implements com.sun.xml.dtdparser.DTDEventListener.endDTD.

Receive notification of the end of a DTD.

public void
public void
public void
externalGeneralEntityDecl(String n, String p, String s)

Implements com.sun.xml.dtdparser.DTDEventListener.externalGeneralEntityDecl.

Receive notification of an external parsed general entity declaration event.

public void
externalParameterEntityDecl(String n, String p, String s)

Implements com.sun.xml.dtdparser.DTDEventListener.externalParameterEntityDecl.

Receive notification of an external parameter entity declaration event.

public void
public void
ignorableWhitespace(char[] ch, int start, int length)

Implements com.sun.xml.dtdparser.DTDEventListener.ignorableWhitespace.

Receive notification of ignorable whitespace in element content.

public void
internalGeneralEntityDecl(String n, String v)

Implements com.sun.xml.dtdparser.DTDEventListener.internalGeneralEntityDecl.

Receive notification of a internal general entity declaration event.

public void
internalParameterEntityDecl(String n, String v)

Implements com.sun.xml.dtdparser.DTDEventListener.internalParameterEntityDecl.

Receive notification of a internal parameter entity declaration event.

public void
mixedElement(String elementName)

Implements com.sun.xml.dtdparser.DTDEventListener.mixedElement.

Receives notification of child element of mixed content model.

public void
notationDecl(String name, String publicId, String systemId)

Implements com.sun.xml.dtdparser.DTDEventListener.notationDecl.

Receive notification of a Notation Declaration.

public void
processingInstruction(String target, String data)

Implements com.sun.xml.dtdparser.DTDEventListener.processingInstruction.

Receive notification of a Processing Instruction.

public void
public void
startCDATA()

Implements com.sun.xml.dtdparser.DTDEventListener.startCDATA.

Receive notification that a CDATA section is beginning.

public void
startContentModel(String elementName, short contentModelType)

Implements com.sun.xml.dtdparser.DTDEventListener.startContentModel.

receives notification that parsing of content model is beginning.

public void
startDTD(InputEntity in)

Implements com.sun.xml.dtdparser.DTDEventListener.startDTD.

Receive notification of the beginning of the DTD.

public void
public void
unparsedEntityDecl(String name, String publicId, String systemId, String notationName)

Implements com.sun.xml.dtdparser.DTDEventListener.unparsedEntityDecl.

Receive notification of an unparsed entity declaration.

public void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

DTDHandlerBaseback to summary
public DTDHandlerBase()

Constructs a DTDHandlerBase.

Method Detail

attributeDeclback to summary
public void attributeDecl(String elementName, String attributeName, String attributeType, String[] enumeration, short attributeUse, String defaultValue) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.attributeDecl.

Doc from com.sun.xml.dtdparser.DTDEventListener.attributeDecl.

For each entry in an ATTLIST declaration, this event will be fired.

DTD allows the same attributes to be declared more than once, and in that case the first one wins. I think this method will be only fired for the first one, but I need to check.

Annotations
@Override
Exceptions
SAXException:
for errors
charactersback to summary
public void characters(char[] ch, int start, int length) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.characters.

Doc from com.sun.xml.dtdparser.DTDEventListener.characters.

Receive notification of character data.

The Parser will call this method to report each chunk of character data. SAX parsers may return all contiguous character data in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Note that some parsers will report whitespace using the ignorableWhitespace() method rather than this one (validating parsers must do so).

Annotations
@Override
Exceptions
SAXException:
for errors
childElementback to summary
public void childElement(String elementName, short occurrence) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.childElement.

Annotations
@Override
commentback to summary
public void comment(String n) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.comment.

Doc from com.sun.xml.dtdparser.DTDEventListener.comment.

Receive notification that a comment has been read.

Note that processing instructions are the mechanism designed to hold information for consumption by applications, not comments. XML systems may rely on applications being able to access information found in processing instructions; this is not true of comments, which are typically discarded.

Annotations
@Override
Exceptions
SAXException:
for errors
connectorback to summary
public void connector(short connectorType) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.connector.

Doc from com.sun.xml.dtdparser.DTDEventListener.connector.

Connectors in one model group is guaranteed to be the same.

IOW, you'll never see an event sequence like (a|b,c)

Annotations
@Override
Exceptions
SAXException:
for errors
endCDATAback to summary
public void endCDATA() throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.endCDATA.

Doc from com.sun.xml.dtdparser.DTDEventListener.endCDATA.

Receive notification that the CDATA section finished.

Annotations
@Override
Exceptions
SAXException:
for errors
endContentModelback to summary
public void endContentModel(String elementName, short contentModelType) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.endContentModel.

Doc from com.sun.xml.dtdparser.DTDEventListener.endContentModel.

receives notification that parsing of content model is finished.

Annotations
@Override
Exceptions
SAXException:
for errors
endDTDback to summary
public void endDTD() throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.endDTD.

Doc from com.sun.xml.dtdparser.DTDEventListener.endDTD.

Receive notification of the end of a DTD. The parser will invoke this method only once.

Annotations
@Override
Exceptions
SAXException:
for errors
endModelGroupback to summary
public void endModelGroup(short occurrence) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.endModelGroup.

Annotations
@Override
errorback to summary
public void error(SAXParseException e) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.error.

Annotations
@Override
externalGeneralEntityDeclback to summary
public void externalGeneralEntityDecl(String n, String p, String s) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.externalGeneralEntityDecl.

Doc from com.sun.xml.dtdparser.DTDEventListener.externalGeneralEntityDecl.

Receive notification of an external parsed general entity declaration event.

If a system identifier is present, and it is a relative URL, the parser will have resolved it fully before passing it through this method to a listener.

Annotations
@Override
Exceptions
SAXException:
for errors
externalParameterEntityDeclback to summary
public void externalParameterEntityDecl(String n, String p, String s) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.externalParameterEntityDecl.

Doc from com.sun.xml.dtdparser.DTDEventListener.externalParameterEntityDecl.

Receive notification of an external parameter entity declaration event.

If a system identifier is present, and it is a relative URL, the parser will have resolved it fully before passing it through this method to a listener.

Annotations
@Override
Exceptions
SAXException:
for errors
fatalErrorback to summary
public void fatalError(SAXParseException e) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.fatalError.

Annotations
@Override
ignorableWhitespaceback to summary
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.ignorableWhitespace.

Doc from com.sun.xml.dtdparser.DTDEventListener.ignorableWhitespace.

Receive notification of ignorable whitespace in element content.

Validating Parsers must use this method to report each chunk of ignorable whitespace (see the W3C XML 1.0 recommendation, section 2.10): non-validating parsers may also use this method if they are capable of parsing and using content models.

SAX parsers may return all contiguous whitespace in a single chunk, or they may split it into several chunks; however, all of the characters in any single event must come from the same external entity, so that the Locator provides useful information.

The application must not attempt to read from the array outside of the specified range.

Annotations
@Override
Exceptions
SAXException:
for errors
internalGeneralEntityDeclback to summary
public void internalGeneralEntityDecl(String n, String v) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.internalGeneralEntityDecl.

Doc from com.sun.xml.dtdparser.DTDEventListener.internalGeneralEntityDecl.

Receive notification of a internal general entity declaration event.

Annotations
@Override
Exceptions
SAXException:
for errors
internalParameterEntityDeclback to summary
public void internalParameterEntityDecl(String n, String v) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.internalParameterEntityDecl.

Doc from com.sun.xml.dtdparser.DTDEventListener.internalParameterEntityDecl.

Receive notification of a internal parameter entity declaration event.

Annotations
@Override
Exceptions
SAXException:
for errors
mixedElementback to summary
public void mixedElement(String elementName) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.mixedElement.

Doc from com.sun.xml.dtdparser.DTDEventListener.mixedElement.

Receives notification of child element of mixed content model. This method is called for each child element.

Annotations
@Override
Exceptions
SAXException:
for errors
notationDeclback to summary
public void notationDecl(String name, String publicId, String systemId) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.notationDecl.

Doc from com.sun.xml.dtdparser.DTDEventListener.notationDecl.

Receive notification of a Notation Declaration. Notation declarations are used by elements and entities for identifying embedded non-XML data.

Annotations
@Override
Exceptions
SAXException:
for errors
processingInstructionback to summary
public void processingInstruction(String target, String data) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.processingInstruction.

Doc from com.sun.xml.dtdparser.DTDEventListener.processingInstruction.

Receive notification of a Processing Instruction. Processing instructions contain information meaningful to the application.

Annotations
@Override
Exceptions
SAXException:
for errors
setDocumentLocatorback to summary
public void setDocumentLocator(Locator loc)

Implements com.sun.xml.dtdparser.DTDEventListener.setDocumentLocator.

Annotations
@Override
startCDATAback to summary
public void startCDATA() throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.startCDATA.

Doc from com.sun.xml.dtdparser.DTDEventListener.startCDATA.

Receive notification that a CDATA section is beginning. Data in a CDATA section is reported through the appropriate event, either characters() or ignorableWhitespace.

Annotations
@Override
Exceptions
SAXException:
for errors
startContentModelback to summary
public void startContentModel(String elementName, short contentModelType) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.startContentModel.

Doc from com.sun.xml.dtdparser.DTDEventListener.startContentModel.

receives notification that parsing of content model is beginning.

Annotations
@Override
Exceptions
SAXException:
for errors
startDTDback to summary
public void startDTD(InputEntity in) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.startDTD.

Doc from com.sun.xml.dtdparser.DTDEventListener.startDTD.

Receive notification of the beginning of the DTD.

Annotations
@Override
Exceptions
SAXException:
for errors
startModelGroupback to summary
public void startModelGroup() throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.startModelGroup.

Annotations
@Override
unparsedEntityDeclback to summary
public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.unparsedEntityDecl.

Doc from com.sun.xml.dtdparser.DTDEventListener.unparsedEntityDecl.

Receive notification of an unparsed entity declaration. Unparsed entities are non-XML data.

Annotations
@Override
Exceptions
SAXException:
for errors
warningback to summary
public void warning(SAXParseException err) throws SAXException

Implements com.sun.xml.dtdparser.DTDEventListener.warning.

Annotations
@Override