| API Docs for SAX and DOM |

Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members

# DefaultHandler.hpp

Go to the documentation of this file.

    00001 /*
    00002  * The Apache Software License, Version 1.1
    00003  *
    00004  * Copyright (c) 1999-2000 The Apache Software Foundation.  All rights
    00005  * reserved.
    00006  *
    00007  * Redistribution and use in source and binary forms, with or without
    00008  * modification, are permitted provided that the following conditions
    00009  * are met:
    00010  *
    00011  * 1. Redistributions of source code must retain the above copyright
    00012  *    notice, this list of conditions and the following disclaimer.
    00013  *
    00014  * 2. Redistributions in binary form must reproduce the above copyright
    00015  *    notice, this list of conditions and the following disclaimer in
    00016  *    the documentation and/or other materials provided with the
    00017  *    distribution.
    00018  *
    00019  * 3. The end-user documentation included with the redistribution,
    00020  *    if any, must include the following acknowledgment:
    00021  *       "This product includes software developed by the
    00022  *        Apache Software Foundation (http://www.apache.org/)."
    00023  *    Alternately, this acknowledgment may appear in the software itself,
    00024  *    if and wherever such third-party acknowledgments normally appear.
    00025  *
    00026  * 4. The names "Xerces" and "Apache Software Foundation" must
    00027  *    not be used to endorse or promote products derived from this
    00028  *    software without prior written permission. For written
    00029  *    permission, please contact apache\@apache.org.
    00030  *
    00031  * 5. Products derived from this software may not be called "Apache",
    00032  *    nor may "Apache" appear in their name, without prior written
    00033  *    permission of the Apache Software Foundation.
    00034  *
    00035  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
    00036  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
    00037  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
    00038  * DISCLAIMED.  IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
    00039  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
    00040  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
    00041  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
    00042  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
    00043  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
    00044  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
    00045  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
    00046  * SUCH DAMAGE.
    00047  * ====================================================================
    00048  *
    00049  * This software consists of voluntary contributions made by many
    00050  * individuals on behalf of the Apache Software Foundation, and was
    00051  * originally based on software copyright (c) 1999, International
    00052  * Business Machines, Inc., http://www.ibm.com .  For more information
    00053  * on the Apache Software Foundation, please see
    00054  * <http://www.apache.org/>.
    00055  */
    00056
    00057 /*
    00058  * $Log: DefaultHandler.hpp,v $
    00059  * Revision 1.4  2002/08/20 16:53:56  tng
    00060  * [Bug 6251] Info during compilation.
    00061  *
    00062  * Revision 1.3  2002/06/06 20:38:45  tng
    00063  * Document Fix: document that the returned object from resolveEntity is owned by the parser
    00064  *
    00065  * Revision 1.2  2002/02/20 18:17:02  tng
    00066  * [Bug 5977] Warnings on generating apiDocs.
    00067  *
    00068  * Revision 1.1.1.1  2002/02/01 22:22:09  peiyongz
    00069  * sane_include
    00070  *
    00071  * Revision 1.6  2002/01/28 17:08:33  knoaman
    00072  * SAX2-ext's DeclHandler support.
    00073  *
    00074  * Revision 1.5  2001/11/13 13:24:05  tng
    00075  * Fix documentation for DefaultHandler.
    00076  *
    00077  * Revision 1.4  2000/12/22 15:17:01  tng
    00078  * SAX2-ext's LexicalHandler support added by David Bertoni.
    00079  *
    00080  * Revision 1.3  2000/08/14 18:56:14  aruna1
    00081  * Virtual parameter inconsistency fixed
    00082  *
    00083  * Revision 1.2  2000/08/07 18:21:27  jpolast
    00084  * change  module to
    00085  *
    00086  * Revision 1.1  2000/08/02 18:02:34  jpolast
    00087  * initial checkin of sax2 implementation
    00088  * submitted by Simon Fell (simon@fell.com)
    00089  * and Joe Polastre (jpolast@apache.org)
    00090  *
    00091  *
    00092  */
    00093
    00094
    00095 #ifndef DEFAULTHANDLER_HPP
    00096 #define DEFAULTHANDLER_HPP
    00097
    00098 #include <xercesc/sax2/ContentHandler.hpp>
    00099 #include <xercesc/sax2/LexicalHandler.hpp>
    00100 #include <xercesc/sax2/DeclHandler.hpp>
    00101 #include <xercesc/sax/DTDHandler.hpp>
    00102 #include <xercesc/sax/EntityResolver.hpp>
    00103 #include <xercesc/sax/ErrorHandler.hpp>
    00104 #include <xercesc/sax/SAXParseException.hpp>
    00105
    00106 class Locator;
    00107 class Attributes;
    00108
    00130
    00131 class  DefaultHandler :
    00132
    00133     public EntityResolver,
    00134     public DTDHandler,
    00135     public ContentHandler,
    00136     public ErrorHandler,
    00137     public LexicalHandler,
    00138     public DeclHandler
    00139 {
    00140 public:
    00143
    00158     virtual void characters
    00159     (
    00160         const   XMLCh* const    chars
    00161         , const unsigned int    length
    00162     );
    00163
    00176     virtual void endDocument();
    00177
    00193     virtual void endElement
    00194     (
    00195         const XMLCh* const uri,
    00196         const XMLCh* const localname,
    00197         const XMLCh* const qname
    00198     );
    00199
    00215     virtual void ignorableWhitespace
    00216     (
    00217         const   XMLCh* const    chars
    00218         , const unsigned int    length
    00219     );
    00220
    00236     virtual void processingInstruction
    00237     (
    00238         const   XMLCh* const    target
    00239         , const XMLCh* const    data
    00240     );
    00241
    00247     virtual void resetDocument();
    00249
    00251
    00253
    00264     virtual void setDocumentLocator(const Locator* const locator);
    00265
    00278     virtual void startDocument();
    00279
    00296     virtual void startElement
    00297     (
    00298         const   XMLCh* const    uri,
    00299         const   XMLCh* const    localname,
    00300         const   XMLCh* const    qname
    00301         , const Attributes& attrs
    00302     );
    00303
    00319     virtual void startPrefixMapping
    00320     (
    00321         const   XMLCh* const    prefix,
    00322         const   XMLCh* const    uri
    00323     ) ;
    00324
    00339     virtual void endPrefixMapping
    00340     (
    00341         const   XMLCh* const    prefix
    00342     ) ;
    00343
    00361     virtual void skippedEntity
    00362     (
    00363         const   XMLCh* const    name
    00364     ) ;
    00365
    00367
    00369
    00371
    00392     virtual InputSource* resolveEntity
    00393     (
    00394         const   XMLCh* const    publicId
    00395         , const XMLCh* const    systemId
    00396     );
    00397
    00399
    00402
    00416     virtual void error(const SAXParseException& exception);
    00417
    00435     virtual void fatalError(const SAXParseException& exception);
    00436
    00451     virtual void warning(const SAXParseException& exception);
    00452
    00458     virtual void resetErrors();
    00459
    00461
    00462
    00465
    00479     virtual void notationDecl
    00480     (
    00481         const   XMLCh* const    name
    00482         , const XMLCh* const    publicId
    00483         , const XMLCh* const    systemId
    00484     );
    00485
    00491     virtual void resetDocType();
    00492
    00507     virtual void unparsedEntityDecl
    00508     (
    00509         const   XMLCh* const    name
    00510         , const XMLCh* const    publicId
    00511         , const XMLCh* const    systemId
    00512         , const XMLCh* const    notationName
    00513     );
    00515
    00516
    00518
    00520
    00534     virtual void comment
    00535     (
    00536         const   XMLCh* const    chars
    00537         , const unsigned int    length
    00538     );
    00539
    00549     virtual void endCDATA ();
    00550
    00560     virtual void endDTD ();
    00561
    00572     virtual void endEntity (const XMLCh* const name);
    00573
    00583     virtual void startCDATA ();
    00584
    00597     virtual void startDTD
    00598     (
    00599         const   XMLCh* const    name
    00600         , const   XMLCh* const    publicId
    00601         , const   XMLCh* const    systemId
    00602     );
    00603
    00614     virtual void startEntity (const XMLCh* const name);
    00615
    00617
    00619
    00621
    00638     virtual void elementDecl
    00639     (
    00640         const   XMLCh* const    name
    00641         , const XMLCh* const    model
    00642     );
    00643
    00658     virtual void attributeDecl
    00659     (
    00660         const   XMLCh* const    eName
    00661         , const XMLCh* const    aName
    00662         , const XMLCh* const    type
    00663         , const XMLCh* const    mode
    00664         , const XMLCh* const    value
    00665     );
    00666
    00679     virtual void internalEntityDecl
    00680     (
    00681         const   XMLCh* const    name
    00682         , const XMLCh* const    value
    00683     );
    00684
    00697     virtual void externalEntityDecl
    00698     (
    00699         const   XMLCh* const    name
    00700         , const XMLCh* const    publicId
    00701         , const XMLCh* const    systemId
    00702     );
    00703
    00705 };
    00706
    00707
    00708 // ---------------------------------------------------------------------------
    00709 //  HandlerBase: Inline default implementations
    00710 // ---------------------------------------------------------------------------
    00711 inline void DefaultHandler::characters(const   XMLCh* const
    00712                                        ,const   unsigned int)
    00713 {
    00714 }
    00715
    00716 inline void DefaultHandler::endDocument()
    00717 {
    00718 }
    00719
    00720 inline void DefaultHandler::endElement(const    XMLCh* const
    00721                                         , const XMLCh* const
    00722                                         , const XMLCh* const)
    00723 {
    00724 }
    00725
    00726 inline void DefaultHandler::error(const SAXParseException&)
    00727 {
    00728 }
    00729
    00730 inline void DefaultHandler::fatalError(const SAXParseException& exception)
    00731 {
    00732     throw exception;
    00733 }
    00734
    00735 inline void
    00736 DefaultHandler::ignorableWhitespace( const   XMLCh* const
    00737                                     , const unsigned int)
    00738 {
    00739 }
    00740
    00741 inline void DefaultHandler::notationDecl(  const   XMLCh* const
    00742                                             , const XMLCh* const
    00743                                             , const XMLCh* const)
    00744 {
    00745 }
    00746
    00747 inline void
    00748 DefaultHandler::processingInstruction( const   XMLCh* const
    00749                                         , const XMLCh* const)
    00750 {
    00751 }
    00752
    00753 inline void DefaultHandler::resetErrors()
    00754 {
    00755 }
    00756
    00757 inline void DefaultHandler::resetDocument()
    00758 {
    00759 }
    00760
    00761 inline void DefaultHandler::resetDocType()
    00762 {
    00763 }
    00764
    00765 inline InputSource*
    00766 DefaultHandler::resolveEntity( const   XMLCh* const
    00767                                 , const XMLCh* const)
    00768 {
    00769     return 0;
    00770 }
    00771
    00772 inline void
    00773 DefaultHandler::unparsedEntityDecl(const   XMLCh* const
    00774                                     , const XMLCh* const
    00775                                     , const XMLCh* const
    00776                                     , const XMLCh* const)
    00777 {
    00778 }
    00779
    00780 inline void DefaultHandler::setDocumentLocator(const Locator* const)
    00781 {
    00782 }
    00783
    00784 inline void DefaultHandler::startDocument()
    00785 {
    00786 }
    00787
    00788 inline void
    00789 DefaultHandler::startElement(  const     XMLCh* const
    00790                                 , const   XMLCh* const
    00791                                 , const   XMLCh* const
    00792                                 , const   Attributes&
    00793 )
    00794 {
    00795 }
    00796
    00797 inline void DefaultHandler::warning(const SAXParseException&)
    00798 {
    00799 }
    00800
    00801 inline void DefaultHandler::startPrefixMapping ( const  XMLCh* const
    00802                                                 ,const  XMLCh* const)
    00803 {
    00804 }
    00805
    00806 inline void DefaultHandler::endPrefixMapping ( const    XMLCh* const)
    00807 {
    00808 }
    00809
    00810 inline void DefaultHandler::skippedEntity ( const   XMLCh* const)
    00811 {
    00812 }
    00813
    00814 inline void DefaultHandler::comment(  const   XMLCh* const
    00815                                        , const unsigned int)
    00816 {
    00817 }
    00818
    00819 inline void DefaultHandler::endCDATA ()
    00820 {
    00821 }
    00822
    00823 inline void DefaultHandler::endDTD ()
    00824 {
    00825 }
    00826
    00827 inline void DefaultHandler::endEntity (const XMLCh* const)
    00828 {
    00829 }
    00830
    00831 inline void DefaultHandler::startCDATA ()
    00832 {
    00833 }
    00834
    00835 inline void DefaultHandler::startDTD(  const   XMLCh* const
    00836                                         , const   XMLCh* const
    00837                                         , const   XMLCh* const)
    00838 {
    00839 }
    00840
    00841 inline void DefaultHandler::startEntity (const XMLCh* const)
    00842 {
    00843 }
    00844
    00845 inline void DefaultHandler::attributeDecl(const XMLCh* const,
    00846                                           const XMLCh* const,
    00847                                           const XMLCh* const,
    00848                                           const XMLCh* const,
    00849                                           const XMLCh* const)
    00850 {
    00851 }
    00852
    00853 inline void DefaultHandler::elementDecl(const XMLCh* const,
    00854                                         const XMLCh* const)
    00855 {
    00856 }
    00857
    00858 inline void DefaultHandler::externalEntityDecl(const XMLCh* const,
    00859                                                const XMLCh* const,
    00860                                                const XMLCh* const)
    00861 {
    00862 }
    00863
    00864 inline void DefaultHandler::internalEntityDecl(const XMLCh* const,
    00865                                                const XMLCh* const)
    00866 {
    00867 }
    00868
    00869 #endif // ! DEFAULTHANDLER_HPP

Copyright © 2000 The Apache Software Foundation. All Rights Reserved.