KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > dom4j > io > aelfred > DefaultHandler


1 /*
2  * Copyright (c) 1999-2000 by David Brownell. All Rights Reserved.
3  *
4  * This program is open source software; you may use, copy, modify, and
5  * redistribute it under the terms of the LICENSE with which it was
6  * originally distributed.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * LICENSE for more details.
12  */

13
14 package org.dom4j.io.aelfred;
15
16 import org.xml.sax.SAXException JavaDoc;
17 import org.xml.sax.ext.DeclHandler JavaDoc;
18 import org.xml.sax.ext.LexicalHandler JavaDoc;
19
20
21 // $Id: DefaultHandler.java,v 1.5 2002/05/24 14:41:55 jstrachan dead $
22

23 /**
24  * This class extends the SAX base handler class to support the
25  * SAX2 Lexical and Declaration handlers. All the handler methods do
26  * is return; except that the SAX base class handles fatal errors by
27  * throwing an exception.
28  *
29  * @author David Brownell
30  * @version $Date: 2002/05/24 14:41:55 $
31  */

32 public class DefaultHandler extends org.xml.sax.helpers.DefaultHandler JavaDoc
33     implements LexicalHandler JavaDoc, DeclHandler JavaDoc
34 {
35     /** Constructs a handler which ignores all parsing events. */
36     public DefaultHandler () { }
37
38 // // SAX1 DocumentHandler (methods not in SAX2 ContentHandler)
39
//
40
// /** <b>SAX1</b> called at the beginning of an element */
41
// public void startElement (String name, AttributeList attrs)
42
// throws SAXException
43
// {}
44
//
45
// /** <b>SAX1</b> called at the end of an element */
46
// public void endElement (String name)
47
// throws SAXException
48
// {}
49

50     // SAX2 LexicalHandler
51

52     /** <b>SAX2</b>: called before parsing CDATA characters */
53     public void startCDATA ()
54     throws SAXException JavaDoc
55     {}
56
57     /** <b>SAX2</b>: called after parsing CDATA characters */
58     public void endCDATA ()
59     throws SAXException JavaDoc
60     {}
61
62     /** <b>SAX2</b>: called when the doctype is partially parsed */
63     public void startDTD (String JavaDoc root, String JavaDoc pubid, String JavaDoc sysid)
64     throws SAXException JavaDoc
65     {}
66
67     /** <b>SAX2</b>: called after the doctype is parsed */
68     public void endDTD ()
69     throws SAXException JavaDoc
70     {}
71
72     /**
73      * <b>SAX2</b>: called before parsing a general entity in content
74      */

75     public void startEntity (String JavaDoc name)
76     throws SAXException JavaDoc
77     {}
78
79     /**
80      * <b>SAX2</b>: called after parsing a general entity in content
81      */

82     public void endEntity (String JavaDoc name)
83     throws SAXException JavaDoc
84     {}
85
86     /** <b>SAX2</b>: called when comments are parsed */
87     public void comment (char buf [], int off, int len)
88     throws SAXException JavaDoc
89     { }
90
91     // SAX2 DeclHandler
92

93     /** <b>SAX2</b>: called on attribute declarations */
94     public void attributeDecl (String JavaDoc element, String JavaDoc name,
95         String JavaDoc type, String JavaDoc defaultType, String JavaDoc defaltValue)
96     throws SAXException JavaDoc
97     {}
98
99     /** <b>SAX2</b>: called on element declarations */
100     public void elementDecl (String JavaDoc name, String JavaDoc model)
101     throws SAXException JavaDoc
102     {}
103
104     /** <b>SAX2</b>: called on external entity declarations */
105     public void externalEntityDecl (String JavaDoc name, String JavaDoc pubid, String JavaDoc sysid)
106     throws SAXException JavaDoc
107     {}
108
109     /** <b>SAX2</b>: called on internal entity declarations */
110     public void internalEntityDecl (String JavaDoc name, String JavaDoc value)
111     throws SAXException JavaDoc
112     {}
113 }
114
115
Popular Tags