001/*
002 * Copyright (c) 1999-2000 by David Brownell.  All Rights Reserved.
003 *
004 * This program is open source software; you may use, copy, modify, and
005 * redistribute it under the terms of the LICENSE with which it was
006 * originally distributed.
007 *
008 * This program is distributed in the hope that it will be useful,
009 * but WITHOUT ANY WARRANTY; without even the implied warranty of
010 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
011 * LICENSE for more details.
012 */
013
014package org.dom4j.io.aelfred;
015
016import org.xml.sax.AttributeList;
017import org.xml.sax.ContentHandler;
018import org.xml.sax.SAXException;
019import org.xml.sax.ext.LexicalHandler;
020import org.xml.sax.ext.DeclHandler;
021
022
023// $Id: DefaultHandler.java,v 1.3 2001/07/30 21:20:54 jstrachan Exp $
024
025/**
026 * This class extends the SAX base handler class to support the
027 * SAX2 Lexical and Declaration handlers.  All the handler methods do
028 * is return; except that the SAX base class handles fatal errors by
029 * throwing an exception.
030 *
031 * @author David Brownell
032 * @version $Date: 2001/07/30 21:20:54 $
033 */
034public class DefaultHandler extends org.xml.sax.helpers.DefaultHandler
035    implements LexicalHandler, DeclHandler
036{
037    /** Constructs a handler which ignores all parsing events. */
038    public DefaultHandler () { }
039
040//    // SAX1 DocumentHandler (methods not in SAX2 ContentHandler)
041//
042//    /** <b>SAX1</b> called at the beginning of an element */
043//    public void startElement (String name, AttributeList attrs)
044//    throws SAXException
045//      {}
046//
047//    /** <b>SAX1</b> called at the end of an element */
048//    public void endElement (String name)
049//    throws SAXException
050//      {}
051
052    // SAX2 LexicalHandler
053
054    /** <b>SAX2</b>:  called before parsing CDATA characters */
055    public void startCDATA ()
056    throws SAXException
057        {}
058
059    /** <b>SAX2</b>:  called after parsing CDATA characters */
060    public void endCDATA ()
061    throws SAXException
062        {}
063
064    /** <b>SAX2</b>:  called when the doctype is partially parsed */
065    public void startDTD (String root, String pubid, String sysid)
066    throws SAXException
067        {}
068
069    /** <b>SAX2</b>:  called after the doctype is parsed */
070    public void endDTD ()
071    throws SAXException
072        {}
073
074    /**
075     * <b>SAX2</b>:  called before parsing a general entity in content
076     */
077    public void startEntity (String name)
078    throws SAXException
079        {}
080
081    /**
082     * <b>SAX2</b>:  called after parsing a general entity in content
083     */
084    public void endEntity (String name)
085    throws SAXException
086        {}
087
088    /** <b>SAX2</b>:  called when comments are parsed */
089    public void comment (char buf [], int off, int len)
090    throws SAXException
091        { }
092
093    // SAX2 DeclHandler
094
095    /** <b>SAX2</b>:  called on attribute declarations */
096    public void attributeDecl (String element, String name,
097            String type, String defaultType, String defaltValue)
098    throws SAXException
099        {}
100
101    /** <b>SAX2</b>:  called on element declarations */
102    public void elementDecl (String name, String model)
103    throws SAXException
104        {}
105
106    /** <b>SAX2</b>:  called on external entity declarations */
107    public void externalEntityDecl (String name, String pubid, String sysid)
108    throws SAXException
109        {}
110
111    /** <b>SAX2</b>:  called on internal entity declarations */
112    public void internalEntityDecl (String name, String value)
113    throws SAXException
114        {}
115}