| com.sun.xml.dtdparser.DTDEventListener
All known Subclasses: com.sun.xml.dtdparser.DTDHandlerBase,
DTDEventListener | public interface DTDEventListener extends EventListener(Code) | | All DTD parsing events are signaled through this interface.
|
Method Summary | |
public void | attributeDecl(String elementName, String attributeName, String attributeType, String[] enumeration, short attributeUse, String defaultValue) 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. | public void | characters(char ch, int start, int length) Receive notification of character data.
The Parser will call this method to report each chunk of
character data. | public void | childElement(String elementName, short occurence) | public void | comment(String text) Receive notification that a comment has been read. | public void | connector(short connectorType) Connectors in one model group is guaranteed to be the same. | public void | endCDATA() Receive notification that the CDATA section finished. | public void | endContentModel(String elementName, short contentModelType) receives notification that parsing of content model is finished. | public void | endDTD() Receive notification of the end of a DTD. | public void | endModelGroup(short occurence) | public void | error(SAXParseException e) | public void | externalGeneralEntityDecl(String name, String publicId, String systemId) Receive notification of an external parsed general entity
declaration event. | public void | externalParameterEntityDecl(String name, String publicId, String systemId) Receive notification of an external parameter entity declaration
event. | public void | fatalError(SAXParseException e) | public void | ignorableWhitespace(char ch, int start, int length) Receive notification of ignorable whitespace in element content. | public void | internalGeneralEntityDecl(String name, String value) Receive notification of a internal general entity declaration event.
Parameters: name - The internal general entity name. Parameters: value - The value of the entity, which may include unexpandedentity references. | public void | internalParameterEntityDecl(String name, String value) Receive notification of a internal parameter entity declaration
event.
Parameters: name - The internal parameter entity name. Parameters: value - The value of the entity, which may include unexpandedentity references. | public void | mixedElement(String elementName) receives notification of child element of mixed content model. | public void | notationDecl(String name, String publicId, String systemId) Receive notification of a Notation Declaration. | public void | processingInstruction(String target, String data) Receive notification of a Processing Instruction. | public void | setDocumentLocator(Locator loc) | public void | startCDATA() Receive notification that a CDATA section is beginning. | public void | startContentModel(String elementName, short contentModelType) receives notification that parsing of content model is beginning.
Parameters: elementName - name of the element whose content model is going to be defined. Parameters: contentModelType - DTDEventListener.CONTENT_MODEL_EMPTYthis element has EMPTY content model. | public void | startDTD(InputEntity in) Receive notification of the beginning of the DTD. | public void | startModelGroup() | public void | unparsedEntityDecl(String name, String publicId, String systemId, String notationName) Receive notification of an unparsed entity declaration. | public void | warning(SAXParseException err) |
CHOICE | final public short CHOICE(Code) | | |
CONTENT_MODEL_ANY | final public short CONTENT_MODEL_ANY(Code) | | |
CONTENT_MODEL_CHILDREN | final public short CONTENT_MODEL_CHILDREN(Code) | | |
CONTENT_MODEL_EMPTY | final public short CONTENT_MODEL_EMPTY(Code) | | |
CONTENT_MODEL_MIXED | final public short CONTENT_MODEL_MIXED(Code) | | |
OCCURENCE_ONCE | final public short OCCURENCE_ONCE(Code) | | |
OCCURENCE_ONE_OR_MORE | final public short OCCURENCE_ONE_OR_MORE(Code) | | |
OCCURENCE_ZERO_OR_MORE | final public short OCCURENCE_ZERO_OR_MORE(Code) | | |
OCCURENCE_ZERO_OR_ONE | final public short OCCURENCE_ZERO_OR_ONE(Code) | | |
SEQUENCE | final public short SEQUENCE(Code) | | |
USE_FIXED | final public short USE_FIXED(Code) | | |
USE_IMPLIED | final public short USE_IMPLIED(Code) | | |
USE_NORMAL | final public short USE_NORMAL(Code) | | |
USE_REQUIRED | final public short USE_REQUIRED(Code) | | |
attributeDecl | public void attributeDecl(String elementName, String attributeName, String attributeType, String[] enumeration, short attributeUse, String defaultValue) throws SAXException(Code) | | 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.
|
characters | public void characters(char ch, int start, int length) throws SAXException(Code) | | 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).
Parameters: ch - The characters from the DTD. Parameters: start - The start position in the array. Parameters: length - The number of characters to read from the array. throws: SAXException - See Also: DTDEventListener.ignorableWhitespace(char[],int,int) |
comment | public void comment(String text) throws SAXException(Code) | | 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.
Parameters: text - the text within the comment delimiters. throws: SAXException - |
endContentModel | public void endContentModel(String elementName, short contentModelType) throws SAXException(Code) | | receives notification that parsing of content model is finished.
|
externalGeneralEntityDecl | public void externalGeneralEntityDecl(String name, String publicId, String systemId) throws SAXException(Code) | | 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.
Parameters: name - The entity name. Parameters: publicId - The entity's public identifier, or null ifnone was given. Parameters: systemId - The entity's system identifier. throws: SAXException - See Also: DTDEventListener.unparsedEntityDecl(String,String,String,String) |
externalParameterEntityDecl | public void externalParameterEntityDecl(String name, String publicId, String systemId) throws SAXException(Code) | | 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.
Parameters: name - The parameter entity name. Parameters: publicId - The entity's public identifier, or null ifnone was given. Parameters: systemId - The entity's system identifier. throws: SAXException - See Also: DTDEventListener.unparsedEntityDecl(String,String,String,String) |
ignorableWhitespace | public void ignorableWhitespace(char ch, int start, int length) throws SAXException(Code) | | 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.
Parameters: ch - The characters from the DTD. Parameters: start - The start position in the array. Parameters: length - The number of characters to read from the array. throws: SAXException - See Also: DTDEventListener.characters(char[],int,int) |
notationDecl | public void notationDecl(String name, String publicId, String systemId) throws SAXException(Code) | | Receive notification of a Notation Declaration.
Notation declarations are used by elements and entities
for identifying embedded non-XML data.
Parameters: name - The notation name, referred to by entities andelements. Parameters: publicId - The public identifier Parameters: systemId - The system identifier |
processingInstruction | public void processingInstruction(String target, String data) throws SAXException(Code) | | Receive notification of a Processing Instruction.
Processing instructions contain information meaningful
to the application.
Parameters: target - The target of the proceessing instructionwhich should have meaning to the application. Parameters: data - The instruction itself which should containvalid XML characters. throws: SAXException - |
setDocumentLocator | public void setDocumentLocator(Locator loc)(Code) | | |
startCDATA | public void startCDATA() throws SAXException(Code) | | Receive notification that a CDATA section is beginning. Data in a
CDATA section is is reported through the appropriate event, either
characters() or ignorableWhitespace.
throws: SAXException - See Also: DTDEventListener.endCDATA() |
startContentModel | public void startContentModel(String elementName, short contentModelType) throws SAXException(Code) | | receives notification that parsing of content model is beginning.
Parameters: elementName - name of the element whose content model is going to be defined. Parameters: contentModelType - DTDEventListener.CONTENT_MODEL_EMPTYthis element has EMPTY content model. This notificationwill be immediately followed by the corresponding endContentModel.DTDEventListener.CONTENT_MODEL_ANYthis element has ANY content model. This notificationwill be immediately followed by the corresponding endContentModel.DTDEventListener.CONTENT_MODEL_MIXEDthis element has mixed content model. #PCDATA will not be reported.each child element will be reported by mixedElement method.DTDEventListener.CONTENT_MODEL_CHILDRENthis elemen has child content model. The actual content model willbe reported by childElement, startModelGroup, endModelGroup, andconnector methods. Possible call sequences are:START := MODEL_GROUPMODEL_GROUP := startModelGroup TOKEN (connector TOKEN)* endModelGroupTOKEN := childElement| MODEL_GROUP |
unparsedEntityDecl | public void unparsedEntityDecl(String name, String publicId, String systemId, String notationName) throws SAXException(Code) | | Receive notification of an unparsed entity declaration.
Unparsed entities are non-XML data.
Parameters: name - The name of the unparsed entity. Parameters: publicId - The public identifier Parameters: systemId - The system identifier Parameters: notationName - The associated notation |
|
|