GXPARSE hosted by SourceForge.net Logo

ca.gorman.xml.parse
Interface DtdListener<T extends Parser>

All Known Subinterfaces:
Listener<T>
All Known Implementing Classes:
AbstractErrorListener, AbstractListener, CoroutineCheckListener, DumpListener, SkipListener

public interface DtdListener<T extends Parser>

DTD Listener interface for XML processing applications that are driven by an XML push Parser.


Method Summary
 void attributeDecl(T parser, String eName, String aName, String type, String valueDefault, String value)
           Report an attribute type declaration.
 void doDtd(T parser, CurrentDtd dtd)
           Receive a request to handle a DTD that is being being parsed.
 void elementDecl(T parser, String name, String model)
           Report an element type declaration.
 void externalEntityDecl(T parser, String name, String publicId, String systemId)
           Report a parsed external entity declaration.
 void internalEntityDecl(T parser, String name, String value)
           Report an internal entity declaration.
 void notationDecl(T parser, String name, String publicId, String systemId)
           Receive notification of a notation declaration event.
 void unparsedEntityDecl(T parser, String name, String publicId, String systemId, String notationName)
           Receive notification of an unparsed entity declaration event.
 

Method Detail

notationDecl

void notationDecl(T parser,
                  String name,
                  String publicId,
                  String systemId)
                  throws ListenerException,
                         IOException

Receive notification of a notation declaration event.

Parameters:
parser - The Parser that invoked this method
name - The notation name.
publicId - The notation's public identifier, or null if none was given.
systemId - The notation's system identifier, or null if none was given.
Throws:
ListenerException
IOException

unparsedEntityDecl

void unparsedEntityDecl(T parser,
                        String name,
                        String publicId,
                        String systemId,
                        String notationName)
                        throws ListenerException,
                               IOException

Receive notification of an unparsed entity declaration event.

Parameters:
parser - The Parser that invoked this method
name - The unparsed entity's name.
publicId - The entity's public identifier, or null if none was given.
systemId - The entity's system identifier.
notationName - The name of the associated notation.
Throws:
ListenerException
IOException

elementDecl

void elementDecl(T parser,
                 String name,
                 String model)
                 throws ListenerException,
                        IOException

Report an element type declaration.

Parameters:
parser - The Parser that invoked this method
name - The element type name.
model - The content model as a normalized string.
Throws:
ListenerException
IOException

attributeDecl

void attributeDecl(T parser,
                   String eName,
                   String aName,
                   String type,
                   String valueDefault,
                   String value)
                   throws ListenerException,
                          IOException

Report an attribute type declaration.

Parameters:
parser - The Parser that invoked this method
eName - The name of the associated element.
aName - The name of the attribute.
type - A string representing the attribute type.
valueDefault - A string representing the attribute default ("#IMPLIED", "#REQUIRED", or "#FIXED") or null if none of these applies.
value - A string representing the attribute's default value, or null if there is none.
Throws:
ListenerException
IOException

internalEntityDecl

void internalEntityDecl(T parser,
                        String name,
                        String value)
                        throws ListenerException,
                               IOException

Report an internal entity declaration.

Parameters:
parser - The Parser that invoked this method
name - The name of the entity. If it is a parameter entity, the name will begin with '%'.
value - The replacement text of the entity.
Throws:
ListenerException
IOException

externalEntityDecl

void externalEntityDecl(T parser,
                        String name,
                        String publicId,
                        String systemId)
                        throws ListenerException,
                               IOException

Report a parsed external entity declaration.

Parameters:
parser - The Parser that invoked this method
name - The name of the entity. If it is a parameter entity, the name will begin with '%'.
publicId - The declared public identifier of the entity, or null if none was declared.
systemId - The declared system identifier of the entity.
Throws:
ListenerException
IOException

doDtd

void doDtd(T parser,
           CurrentDtd dtd)
           throws ListenerException,
                  IOException

Receive a request to handle a DTD that is being being parsed. The method is invoked at the start of parsing the DTD and mustinvoke a content handler exactly once to parse the content of the DTD. Consequently, the method has control only before and after the parsing of the DTD.

Parameters:
parser - The Parser that invoked this method
dtd - CurrentDtd instance with a content handler to parse the centent of the DTD.
Throws:
ListenerRuntimeException - if this method does not invoke the content handler exactly once before returning.
ListenerException
IOException

GXPARSE download

GXPARSE Generic XML Stream Parser API and supporting tools.   Release $Name: gxparse-sf-alpha-2_0 $
Copyright 2003-2004 Ian E. Gorman
Released under GNU Lesser General Public License