001: package com.jclark.xml.parse.io;
002:
003: import java.io.IOException;
004: import com.jclark.xml.parse.*;
005:
006: /**
007: * An extension of <code>Application</code> that restricts
008: * methods to throwing <code>IOException</code>.
009: *
010: * @version $Revision: 1.2 $ $Date: 1998/06/10 09:43:56 $
011: */
012: public interface Application extends
013: com.jclark.xml.parse.base.Application {
014: /**
015: * Reports the start of the document.
016: * This is called once per well-formed document before any other methods.
017: */
018: void startDocument() throws IOException;
019:
020: /**
021: * Reports the end of the prolog.
022: * Called before the start of the first element.
023: */
024: void endProlog(EndPrologEvent event) throws IOException;
025:
026: /**
027: * Reports the start of an element.
028: * This includes both start-tags and empty elements.
029: */
030: void startElement(StartElementEvent event) throws IOException;
031:
032: /**
033: * Reports character data.
034: */
035: void characterData(CharacterDataEvent event) throws IOException;
036:
037: /**
038: * Reports the end of a element.
039: * This includes both end-tags and empty elements.
040: */
041: void endElement(EndElementEvent event) throws IOException;
042:
043: /**
044: * Reports a processing instruction.
045: * Note that processing instructions can occur before or after the
046: * document element.
047: */
048: void processingInstruction(ProcessingInstructionEvent event)
049: throws IOException;
050:
051: /**
052: * Reports the end of the document.
053: * Called once per well-formed document, after all other methods.
054: * Not called if the document is not well-formed.
055: */
056: void endDocument() throws IOException;
057:
058: /**
059: * Reports a comment.
060: * Note that comments can occur before or after the
061: * document element.
062: */
063: void comment(CommentEvent event) throws IOException;
064:
065: /**
066: * Reports the start of a CDATA section.
067: */
068: void startCdataSection(StartCdataSectionEvent event)
069: throws IOException;
070:
071: /**
072: * Reports the end of a CDATA section.
073: */
074: void endCdataSection(EndCdataSectionEvent event) throws IOException;
075:
076: /**
077: * Reports the start of an entity reference.
078: * This event will be followed by the result of parsing
079: * the entity's replacement text.
080: * This is not called for entity references in attribute values.
081: */
082: void startEntityReference(StartEntityReferenceEvent event)
083: throws IOException;
084:
085: /**
086: * Reports the start of an entity reference.
087: * This event follow's the result of parsing
088: * the entity's replacement text.
089: * This is not called for entity references in attribute values.
090: */
091: void endEntityReference(EndEntityReferenceEvent event)
092: throws IOException;
093:
094: /**
095: * Reports the start of the document type declaration.
096: */
097: void startDocumentTypeDeclaration(
098: StartDocumentTypeDeclarationEvent event) throws IOException;
099:
100: /**
101: * Reports the end of the document type declaration.
102: */
103: void endDocumentTypeDeclaration(
104: EndDocumentTypeDeclarationEvent event) throws IOException;
105:
106: /**
107: * Reports a markup declaration.
108: */
109: void markupDeclaration(MarkupDeclarationEvent event)
110: throws IOException;
111: }
|