KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > icl > saxon > 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 com.icl.saxon.aelfred;
15
16 import org.xml.sax.AttributeList JavaDoc;
17 import org.xml.sax.ContentHandler JavaDoc;
18 import org.xml.sax.SAXException JavaDoc;
19 import org.xml.sax.ext.LexicalHandler JavaDoc;
20 import org.xml.sax.ext.DeclHandler JavaDoc;
21
22
23 // $Id: DefaultHandler.java,v 1.9 2000/02/28 04:43:05 mojo Exp $
24

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

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

52     // SAX2 LexicalHandler
53

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

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

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

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