1 package net.sf.tomp.xtcl.test;
2
3 import net.sf.tomp.xtcl.filter.XTFilterImpl;
4
5 import org.xml.sax.Attributes;
6 import org.xml.sax.SAXException;
7
8 /***
9 * A trace XTFilter -- prints SAX events on stdout
10 *
11 * @author tomp
12 */
13 public class PokusXTFilter extends XTFilterImpl {
14 /***
15 * DOCUMENT ME!
16 *
17 * @throws SAXException DOCUMENT ME!
18 */
19 public void startDocument() throws SAXException {
20 System.out.println("!!!" + this + ".startDocument");
21
22
23 super.startDocument();
24 }
25
26 /***
27 * DOCUMENT ME!
28 *
29 * @throws SAXException DOCUMENT ME!
30 */
31 public void endDocument() throws SAXException {
32 System.out.println("!!!" + this + ".endDocument");
33 super.endDocument();
34 }
35
36 /***
37 * DOCUMENT ME!
38 *
39 * @param prefix DOCUMENT ME!
40 * @param uri DOCUMENT ME!
41 * @throws SAXException DOCUMENT ME!
42 */
43 public void startPrefixMapping(String prefix, String uri)
44 throws SAXException {
45 System.out.println("!!!" + this + ".startPrefixMapping " + prefix + "="
46 + uri);
47 super.startPrefixMapping(prefix, uri);
48 }
49
50 /***
51 * DOCUMENT ME!
52 *
53 * @param prefix DOCUMENT ME!
54 * @throws SAXException DOCUMENT ME!
55 */
56 public void endPrefixMapping(String prefix) throws SAXException {
57 System.out.println("!!!" + this + ".endPrefixMapping " + prefix);
58 super.endPrefixMapping(prefix);
59 }
60
61 /***
62 * Filter a start element event.
63 *
64 * @param uri The element's Namespace URI, or the empty string.
65 * @param localName The element's local name, or the empty string.
66 * @param qName The element's qualified (prefixed) name, or the empty
67 * string.
68 * @param atts The element's attributes.
69 * @exception SAXException The client may throw an exception during
70 * processing.
71 */
72 public void startElement(String uri, String localName, String qName,
73 Attributes atts) throws SAXException {
74 System.out.println("!!!" + this + ".startElement localName="+localName);
75 super.startElement(uri, localName, qName, atts);
76 }
77
78 /***
79 * Filter an end element event.
80 *
81 * @param uri The element's Namespace URI, or the empty string.
82 * @param localName The element's local name, or the empty string.
83 * @param qName The element's qualified (prefixed) name, or the empty
84 * string.
85 * @exception SAXException The client may throw an exception during
86 * processing.
87 */
88 public void endElement(String uri, String localName, String qName)
89 throws SAXException {
90 System.out.println("!!!" + this + ".endElement localName="+localName);
91 super.endElement(uri, localName, qName);
92 }
93
94
95
96 /***
97 * Register the start of the DTD. Comments in the DTD are skipped because
98 * they are not part of the XPath data model
99 *
100 * @param name DOCUMENT ME!
101 * @param publicId DOCUMENT ME!
102 * @param systemId DOCUMENT ME!
103 * @throws SAXException DOCUMENT ME!
104 */
105 public void startDTD(String name, String publicId, String systemId)
106 throws SAXException {
107 System.out.println("!!!" + this + ".startDTD name="+name+" public="+publicId+" systemId="+systemId);
108 super.startDTD(name, publicId, systemId);
109 }
110
111 /***
112 * Register the end of the DTD. Comments in the DTD are skipped because they
113 * are not part of the XPath data model
114 *
115 * @throws SAXException DOCUMENT ME!
116 */
117 public void endDTD() throws SAXException {
118 System.out.println("!!!" + this + ".endDTD");
119 super.endDTD();
120 }
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139 }
140
141
142
143
144
145
146
147
148
149
150