This interface defines methods that an
application can implement in order to receive notification from a
XMLReader about notation and unparsed entity
declarations in the DTD of an XML document. Notations and unparsed
entities are two of the most obscure features of XML, and they (and
this interface) are not frequently used. To use a
DTDHandler, define a class that implements the
interface, (or simply subclass the helper class
org.xml.sax.helpers.DefaultHandler) and pass an
instance of that class to the setDTDHandler( )
method of an XMLReader. Then, if the parser
encounters any notation or unparsed entity declarations in the DTD of
the document, it will invoke the notationDecl( )
or unparsedEntityDecl( ) method that you have
supplied. Unparsed entities can appear later in a document as the
value of an attribute, so if your application cares about them, it
should somehow make a note of the entity name and system id for use
later.
public interface DTDHandler {
// Public Instance Methods
void notationDecl(String name, String publicId, String systemId)
throws SAXException;
void unparsedEntityDecl(String name, String publicId, String systemId,
String notationName) throws SAXException;
}
Implementations
javax.xml.transform.sax.TransformerHandler,
HandlerBase,
org.xml.sax.helpers.DefaultHandler,
org.xml.sax.helpers.XMLFilterImpl
Passed To
Parser.setDTDHandler( ),
XMLReader.setDTDHandler( ),
org.xml.sax.helpers.ParserAdapter.setDTDHandler(
),
org.xml.sax.helpers.XMLFilterImpl.setDTDHandler(
),
org.xml.sax.helpers.XMLReaderAdapter.setDTDHandler(
)
Returned By
XMLReader.getDTDHandler( ),
org.xml.sax.helpers.ParserAdapter.getDTDHandler(
),
org.xml.sax.helpers.XMLFilterImpl.getDTDHandler( )
|