~ubuntu-branches/ubuntu/hardy/tagsoup/hardy

« back to all changes in this revision

Viewing changes to src/java/org/ccil/cowan/tagsoup/ScanHandler.java

  • Committer: Bazaar Package Importer
  • Author(s): Paul Cager
  • Date: 2006-11-18 23:12:15 UTC
  • Revision ID: james.westby@ubuntu.com-20061118231215-twg704c4xxj79cad
Tags: upstream-1.0.1
ImportĀ upstreamĀ versionĀ 1.0.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
// This file is part of TagSoup.
 
2
// 
 
3
// This program is free software; you can redistribute it and/or modify
 
4
// it under the terms of the GNU General Public License as published by
 
5
// the Free Software Foundation; either version 2 of the License, or
 
6
// (at your option) any later version.  You may also distribute
 
7
// and/or modify it under version 2.1 of the Academic Free License.
 
8
// 
 
9
// This program is distributed in the hope that it will be useful,
 
10
// but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  
 
12
// 
 
13
// 
 
14
// Scanner handler
 
15
 
 
16
package org.ccil.cowan.tagsoup;
 
17
import org.xml.sax.SAXException;
 
18
 
 
19
/**
 
20
An interface that Scanners use to report events in the input stream.
 
21
**/
 
22
 
 
23
public interface ScanHandler {
 
24
        /**
 
25
        Reports an attribute name without a value.
 
26
        **/
 
27
 
 
28
        public void adup(char[] buff, int offset, int length) throws SAXException;
 
29
 
 
30
        /**
 
31
        Reports an attribute name; a value will follow.
 
32
        **/
 
33
 
 
34
        public void aname(char[] buff, int offset, int length) throws SAXException;
 
35
 
 
36
        /**
 
37
        Reports an attribute value.
 
38
        **/
 
39
 
 
40
        public void aval(char[] buff, int offset, int length) throws SAXException;
 
41
 
 
42
        /**
 
43
         * Reports a <!....> declaration - typically a DOCTYPE
 
44
         */
 
45
        public void decl(char[] buff, int offset, int length) throws SAXException;
 
46
 
 
47
        /**
 
48
        Reports an entity reference or character reference.
 
49
        **/
 
50
 
 
51
        public void entity(char[] buff, int offset, int length) throws SAXException;
 
52
 
 
53
        /**
 
54
        Reports EOF.
 
55
        **/
 
56
 
 
57
        public void eof(char[] buff, int offset, int length) throws SAXException;
 
58
 
 
59
        /**
 
60
        Reports an end-tag.
 
61
        **/
 
62
 
 
63
        public void etag(char[] buff, int offset, int length) throws SAXException;
 
64
 
 
65
        /**
 
66
        Reports the general identifier (element type name) of a start-tag.
 
67
        **/
 
68
 
 
69
        public void gi(char[] buff, int offset, int length) throws SAXException;
 
70
 
 
71
        /**
 
72
        Reports character content.
 
73
        **/
 
74
 
 
75
        public void pcdata(char[] buff, int offset, int length) throws SAXException;
 
76
 
 
77
        /**
 
78
        Reports the data part of a processing instruction.
 
79
        **/
 
80
 
 
81
        public void pi(char[] buff, int offset, int length) throws SAXException;
 
82
 
 
83
        /**
 
84
        Reports the target part of a processing instruction.
 
85
        **/
 
86
 
 
87
        public void pitarget(char[] buff, int offset, int length) throws SAXException;
 
88
 
 
89
        /**
 
90
        Reports the close of a start-tag.
 
91
        **/
 
92
 
 
93
        public void stagc(char[] buff, int offset, int length) throws SAXException;
 
94
 
 
95
        /**
 
96
        Reports the close of an empty-tag.
 
97
        **/
 
98
 
 
99
        public void stage(char[] buff, int offset, int length) throws SAXException;
 
100
 
 
101
        /**
 
102
        Reports a comment.
 
103
        **/
 
104
 
 
105
        public void cmnt(char[] buff, int offset, int length) throws SAXException;
 
106
 
 
107
        /**
 
108
        Returns the value of the last entity or character reference reported.
 
109
        **/
 
110
 
 
111
        public char getEntity();
 
112
        }