aboutsummaryrefslogtreecommitdiff
path: root/src/org/ccil/cowan/tagsoup/ScanHandler.java
blob: 368569a7fc6ac9fa12d5e72a59844e8f666ba995 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
// This file is part of TagSoup and is Copyright 2002-2008 by John Cowan.
//
// TagSoup is licensed under the Apache License,
// Version 2.0.  You may obtain a copy of this license at
// http://www.apache.org/licenses/LICENSE-2.0 .  You may also have
// additional legal rights not granted by this license.
//
// TagSoup is distributed in the hope that it will be useful, but
// unless required by applicable law or agreed to in writing, TagSoup
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS
// OF ANY KIND, either express or implied; not even the implied warranty
// of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// 
// 
// Scanner handler

package org.ccil.cowan.tagsoup;
import org.xml.sax.SAXException;

/**
An interface that Scanners use to report events in the input stream.
**/

public interface ScanHandler {
	/**
	Reports an attribute name without a value.
	**/

	public void adup(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports an attribute name; a value will follow.
	**/

	public void aname(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports an attribute value.
	**/

	public void aval(char[] buff, int offset, int length) throws SAXException;

	/**
	  * Reports the content of a CDATA section (not a CDATA element)
	  */
	public void cdsect(char[] buff, int offset, int length) throws SAXException;

	/**
         * Reports a <!....> declaration - typically a DOCTYPE
         */

	public void decl(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports an entity reference or character reference.
	**/

	public void entity(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports EOF.
	**/

	public void eof(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports an end-tag.
	**/

	public void etag(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports the general identifier (element type name) of a start-tag.
	**/

	public void gi(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports character content.
	**/

	public void pcdata(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports the data part of a processing instruction.
	**/

	public void pi(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports the target part of a processing instruction.
	**/

	public void pitarget(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports the close of a start-tag.
	**/

	public void stagc(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports the close of an empty-tag.
	**/

	public void stage(char[] buff, int offset, int length) throws SAXException;

	/**
	Reports a comment.
	**/

	public void cmnt(char[] buff, int offset, int length) throws SAXException;

	/**
	Returns the value of the last entity or character reference reported.
	**/

	public int getEntity();
	}