View Javadoc

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;
17  import org.xml.sax.ext.DeclHandler;
18  import org.xml.sax.ext.LexicalHandler;
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   * @deprecated Use Aelfred2 instead! THIS CLASS WILL BE REMOVED IN dom4j-1.6 !!
32   */
33  public class DefaultHandler extends org.xml.sax.helpers.DefaultHandler
34      implements LexicalHandler, DeclHandler
35  {
36      /*** Constructs a handler which ignores all parsing events. */
37      public DefaultHandler () { }
38  
39  //    // SAX1 DocumentHandler (methods not in SAX2 ContentHandler)
40  //
41  //    /*** <b>SAX1</b> called at the beginning of an element */
42  //    public void startElement (String name, AttributeList attrs)
43  //    throws SAXException
44  //  {}
45  //
46  //    /*** <b>SAX1</b> called at the end of an element */
47  //    public void endElement (String name)
48  //    throws SAXException
49  //  {}
50  
51      // SAX2 LexicalHandler
52  
53      /*** <b>SAX2</b>:  called before parsing CDATA characters */
54      public void startCDATA ()
55      throws SAXException
56      {}
57  
58      /*** <b>SAX2</b>:  called after parsing CDATA characters */
59      public void endCDATA ()
60      throws SAXException
61      {}
62  
63      /*** <b>SAX2</b>:  called when the doctype is partially parsed */
64      public void startDTD (String root, String pubid, String sysid)
65      throws SAXException
66      {}
67  
68      /*** <b>SAX2</b>:  called after the doctype is parsed */
69      public void endDTD ()
70      throws SAXException
71      {}
72  
73      /***
74       * <b>SAX2</b>:  called before parsing a general entity in content
75       */
76      public void startEntity (String name)
77      throws SAXException
78      {}
79  
80      /***
81       * <b>SAX2</b>:  called after parsing a general entity in content
82       */
83      public void endEntity (String name)
84      throws SAXException
85      {}
86  
87      /*** <b>SAX2</b>:  called when comments are parsed */
88      public void comment (char buf [], int off, int len)
89      throws SAXException
90      { }
91  
92      // SAX2 DeclHandler
93  
94      /*** <b>SAX2</b>:  called on attribute declarations */
95      public void attributeDecl (String element, String name,
96          String type, String defaultType, String defaltValue)
97      throws SAXException
98      {}
99  
100     /*** <b>SAX2</b>:  called on element declarations */
101     public void elementDecl (String name, String model)
102     throws SAXException
103     {}
104 
105     /*** <b>SAX2</b>:  called on external entity declarations */
106     public void externalEntityDecl (String name, String pubid, String sysid)
107     throws SAXException
108     {}
109 
110     /*** <b>SAX2</b>:  called on internal entity declarations */
111     public void internalEntityDecl (String name, String value)
112     throws SAXException
113     {}
114 }
115