| 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.7  2004/01/29 11:46:32  cargilld
    00060  * Code cleanup changes to get rid of various compiler diagnostic messages.
    00061  *
    00062  * Revision 1.6  2003/12/02 14:33:13  amassari
    00063  * Don't use the word "exception" as a variable name, as VC 7.1 complains about it
    00064  *
    00065  * Revision 1.5  2002/11/04 14:55:45  tng
    00066  * C++ Namespace Support.
    00067  *
    00068  * Revision 1.4  2002/08/20 16:53:56  tng
    00069  * [Bug 6251] Info during compilation.
    00070  *
    00071  * Revision 1.3  2002/06/06 20:38:45  tng
    00072  * Document Fix: document that the returned object from resolveEntity is owned by the parser
    00073  *
    00074  * Revision 1.2  2002/02/20 18:17:02  tng
    00075  * [Bug 5977] Warnings on generating apiDocs.
    00076  *
    00077  * Revision 1.1.1.1  2002/02/01 22:22:09  peiyongz
    00078  * sane_include
    00079  *
    00080  * Revision 1.6  2002/01/28 17:08:33  knoaman
    00081  * SAX2-ext's DeclHandler support.
    00082  *
    00083  * Revision 1.5  2001/11/13 13:24:05  tng
    00084  * Fix documentation for DefaultHandler.
    00085  *
    00086  * Revision 1.4  2000/12/22 15:17:01  tng
    00087  * SAX2-ext's LexicalHandler support added by David Bertoni.
    00088  *
    00089  * Revision 1.3  2000/08/14 18:56:14  aruna1
    00090  * Virtual parameter inconsistency fixed
    00091  *
    00092  * Revision 1.2  2000/08/07 18:21:27  jpolast
    00093  * change  module to
    00094  *
    00095  * Revision 1.1  2000/08/02 18:02:34  jpolast
    00096  * initial checkin of sax2 implementation
    00097  * submitted by Simon Fell (simon@fell.com)
    00098  * and Joe Polastre (jpolast@apache.org)
    00099  *
    00100  *
    00101  */
    00102
    00103
    00104 #ifndef DEFAULTHANDLER_HPP
    00105 #define DEFAULTHANDLER_HPP
    00106
    00107 #include <xercesc/sax2/ContentHandler.hpp>
    00108 #include <xercesc/sax2/LexicalHandler.hpp>
    00109 #include <xercesc/sax2/DeclHandler.hpp>
    00110 #include <xercesc/sax/DTDHandler.hpp>
    00111 #include <xercesc/sax/EntityResolver.hpp>
    00112 #include <xercesc/sax/ErrorHandler.hpp>
    00113 #include <xercesc/sax/SAXParseException.hpp>
    00114
    00115 XERCES_CPP_NAMESPACE_BEGIN
    00116
    00117 class Locator;
    00118 class Attributes;
    00119
    00142 class  DefaultHandler :
    00143
    00144     public EntityResolver,
    00145     public DTDHandler,
    00146     public ContentHandler,
    00147     public ErrorHandler,
    00148     public LexicalHandler,
    00149     public DeclHandler
    00150 {
    00151 public:
    00169     virtual void characters
    00170     (
    00171         const   XMLCh* const    chars
    00172         , const unsigned int    length
    00173     );
    00174
    00187     virtual void endDocument();
    00188
    00204     virtual void endElement
    00205     (
    00206         const XMLCh* const uri,
    00207         const XMLCh* const localname,
    00208         const XMLCh* const qname
    00209     );
    00210
    00226     virtual void ignorableWhitespace
    00227     (
    00228         const   XMLCh* const    chars
    00229         , const unsigned int    length
    00230     );
    00231
    00247     virtual void processingInstruction
    00248     (
    00249         const   XMLCh* const    target
    00250         , const XMLCh* const    data
    00251     );
    00252
    00258     virtual void resetDocument();
    00260
    00275     virtual void setDocumentLocator(const Locator* const locator);
    00276
    00289     virtual void startDocument();
    00290
    00307     virtual void startElement
    00308     (
    00309         const   XMLCh* const    uri,
    00310         const   XMLCh* const    localname,
    00311         const   XMLCh* const    qname
    00312         , const Attributes& attrs
    00313     );
    00314
    00330     virtual void startPrefixMapping
    00331     (
    00332         const   XMLCh* const    prefix,
    00333         const   XMLCh* const    uri
    00334     ) ;
    00335
    00350     virtual void endPrefixMapping
    00351     (
    00352         const   XMLCh* const    prefix
    00353     ) ;
    00354
    00372     virtual void skippedEntity
    00373     (
    00374         const   XMLCh* const    name
    00375     ) ;
    00376
    00378
    00403     virtual InputSource* resolveEntity
    00404     (
    00405         const   XMLCh* const    publicId
    00406         , const XMLCh* const    systemId
    00407     );
    00408
    00410
    00427     virtual void error(const SAXParseException& exc);
    00428
    00446     virtual void fatalError(const SAXParseException& exc);
    00447
    00462     virtual void warning(const SAXParseException& exc);
    00463
    00469     virtual void resetErrors();
    00470
    00472
    00473
    00476
    00490     virtual void notationDecl
    00491     (
    00492         const   XMLCh* const    name
    00493         , const XMLCh* const    publicId
    00494         , const XMLCh* const    systemId
    00495     );
    00496
    00502     virtual void resetDocType();
    00503
    00518     virtual void unparsedEntityDecl
    00519     (
    00520         const   XMLCh* const    name
    00521         , const XMLCh* const    publicId
    00522         , const XMLCh* const    systemId
    00523         , const XMLCh* const    notationName
    00524     );
    00526
    00527
    00545     virtual void comment
    00546     (
    00547         const   XMLCh* const    chars
    00548         , const unsigned int    length
    00549     );
    00550
    00560     virtual void endCDATA ();
    00561
    00571     virtual void endDTD ();
    00572
    00583     virtual void endEntity (const XMLCh* const name);
    00584
    00594     virtual void startCDATA ();
    00595
    00608     virtual void startDTD
    00609     (
    00610         const   XMLCh* const    name
    00611         , const   XMLCh* const    publicId
    00612         , const   XMLCh* const    systemId
    00613     );
    00614
    00625     virtual void startEntity (const XMLCh* const name);
    00626
    00628
    00632
    00649     virtual void elementDecl
    00650     (
    00651         const   XMLCh* const    name
    00652         , const XMLCh* const    model
    00653     );
    00654
    00669     virtual void attributeDecl
    00670     (
    00671         const   XMLCh* const    eName
    00672         , const XMLCh* const    aName
    00673         , const XMLCh* const    type
    00674         , const XMLCh* const    mode
    00675         , const XMLCh* const    value
    00676     );
    00677
    00690     virtual void internalEntityDecl
    00691     (
    00692         const   XMLCh* const    name
    00693         , const XMLCh* const    value
    00694     );
    00695
    00708     virtual void externalEntityDecl
    00709     (
    00710         const   XMLCh* const    name
    00711         , const XMLCh* const    publicId
    00712         , const XMLCh* const    systemId
    00713     );
    00714
    00716
    00717     DefaultHandler() {};
    00718     virtual ~DefaultHandler() {};
    00719
    00720 private:
    00721     // -----------------------------------------------------------------------
    00722     //  Unimplemented constructors and operators
    00723     // -----------------------------------------------------------------------
    00724     DefaultHandler(const DefaultHandler&);
    00725     DefaultHandler& operator=(const DefaultHandler&);
    00726 };
    00727
    00728
    00729 // ---------------------------------------------------------------------------
    00730 //  HandlerBase: Inline default implementations
    00731 // ---------------------------------------------------------------------------
    00732 inline void DefaultHandler::characters(const   XMLCh* const
    00733                                        ,const   unsigned int)
    00734 {
    00735 }
    00736
    00737 inline void DefaultHandler::endDocument()
    00738 {
    00739 }
    00740
    00741 inline void DefaultHandler::endElement(const    XMLCh* const
    00742                                         , const XMLCh* const
    00743                                         , const XMLCh* const)
    00744 {
    00745 }
    00746
    00747 inline void DefaultHandler::error(const SAXParseException&)
    00748 {
    00749 }
    00750
    00751 inline void DefaultHandler::fatalError(const SAXParseException& exc)
    00752 {
    00753     throw exc;
    00754 }
    00755
    00756 inline void
    00757 DefaultHandler::ignorableWhitespace( const   XMLCh* const
    00758                                     , const unsigned int)
    00759 {
    00760 }
    00761
    00762 inline void DefaultHandler::notationDecl(  const   XMLCh* const
    00763                                             , const XMLCh* const
    00764                                             , const XMLCh* const)
    00765 {
    00766 }
    00767
    00768 inline void
    00769 DefaultHandler::processingInstruction( const   XMLCh* const
    00770                                         , const XMLCh* const)
    00771 {
    00772 }
    00773
    00774 inline void DefaultHandler::resetErrors()
    00775 {
    00776 }
    00777
    00778 inline void DefaultHandler::resetDocument()
    00779 {
    00780 }
    00781
    00782 inline void DefaultHandler::resetDocType()
    00783 {
    00784 }
    00785
    00786 inline InputSource*
    00787 DefaultHandler::resolveEntity( const   XMLCh* const
    00788                                 , const XMLCh* const)
    00789 {
    00790     return 0;
    00791 }
    00792
    00793 inline void
    00794 DefaultHandler::unparsedEntityDecl(const   XMLCh* const
    00795                                     , const XMLCh* const
    00796                                     , const XMLCh* const
    00797                                     , const XMLCh* const)
    00798 {
    00799 }
    00800
    00801 inline void DefaultHandler::setDocumentLocator(const Locator* const)
    00802 {
    00803 }
    00804
    00805 inline void DefaultHandler::startDocument()
    00806 {
    00807 }
    00808
    00809 inline void
    00810 DefaultHandler::startElement(  const     XMLCh* const
    00811                                 , const   XMLCh* const
    00812                                 , const   XMLCh* const
    00813                                 , const   Attributes&
    00814 )
    00815 {
    00816 }
    00817
    00818 inline void DefaultHandler::warning(const SAXParseException&)
    00819 {
    00820 }
    00821
    00822 inline void DefaultHandler::startPrefixMapping ( const  XMLCh* const
    00823                                                 ,const  XMLCh* const)
    00824 {
    00825 }
    00826
    00827 inline void DefaultHandler::endPrefixMapping ( const    XMLCh* const)
    00828 {
    00829 }
    00830
    00831 inline void DefaultHandler::skippedEntity ( const   XMLCh* const)
    00832 {
    00833 }
    00834
    00835 inline void DefaultHandler::comment(  const   XMLCh* const
    00836                                        , const unsigned int)
    00837 {
    00838 }
    00839
    00840 inline void DefaultHandler::endCDATA ()
    00841 {
    00842 }
    00843
    00844 inline void DefaultHandler::endDTD ()
    00845 {
    00846 }
    00847
    00848 inline void DefaultHandler::endEntity (const XMLCh* const)
    00849 {
    00850 }
    00851
    00852 inline void DefaultHandler::startCDATA ()
    00853 {
    00854 }
    00855
    00856 inline void DefaultHandler::startDTD(  const   XMLCh* const
    00857                                         , const   XMLCh* const
    00858                                         , const   XMLCh* const)
    00859 {
    00860 }
    00861
    00862 inline void DefaultHandler::startEntity (const XMLCh* const)
    00863 {
    00864 }
    00865
    00866 inline void DefaultHandler::attributeDecl(const XMLCh* const,
    00867                                           const XMLCh* const,
    00868                                           const XMLCh* const,
    00869                                           const XMLCh* const,
    00870                                           const XMLCh* const)
    00871 {
    00872 }
    00873
    00874 inline void DefaultHandler::elementDecl(const XMLCh* const,
    00875                                         const XMLCh* const)
    00876 {
    00877 }
    00878
    00879 inline void DefaultHandler::externalEntityDecl(const XMLCh* const,
    00880                                                const XMLCh* const,
    00881                                                const XMLCh* const)
    00882 {
    00883 }
    00884
    00885 inline void DefaultHandler::internalEntityDecl(const XMLCh* const,
    00886                                                const XMLCh* const)
    00887 {
    00888 }
    00889
    00890 XERCES_CPP_NAMESPACE_END
    00891
    00892 #endif // ! DEFAULTHANDLER_HPP

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