DefaultHandler.hpp Source File

| 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.5  2002/11/04 14:55:45  tng
    00060  * C++ Namespace Support.
    00061  *
    00062  * Revision 1.4  2002/08/20 16:53:56  tng
    00063  * [Bug 6251] Info during compilation.
    00064  *
    00065  * Revision 1.3  2002/06/06 20:38:45  tng
    00066  * Document Fix: document that the returned object from resolveEntity is owned by the parser
    00067  *
    00068  * Revision 1.2  2002/02/20 18:17:02  tng
    00069  * [Bug 5977] Warnings on generating apiDocs.
    00070  *
    00071  * Revision 1.1.1.1  2002/02/01 22:22:09  peiyongz
    00072  * sane_include
    00073  *
    00074  * Revision 1.6  2002/01/28 17:08:33  knoaman
    00075  * SAX2-ext's DeclHandler support.
    00076  *
    00077  * Revision 1.5  2001/11/13 13:24:05  tng
    00078  * Fix documentation for DefaultHandler.
    00079  *
    00080  * Revision 1.4  2000/12/22 15:17:01  tng
    00081  * SAX2-ext's LexicalHandler support added by David Bertoni.
    00082  *
    00083  * Revision 1.3  2000/08/14 18:56:14  aruna1
    00084  * Virtual parameter inconsistency fixed
    00085  *
    00086  * Revision 1.2  2000/08/07 18:21:27  jpolast
    00087  * change  module to
    00088  *
    00089  * Revision 1.1  2000/08/02 18:02:34  jpolast
    00090  * initial checkin of sax2 implementation
    00091  * submitted by Simon Fell (simon@fell.com)
    00092  * and Joe Polastre (jpolast@apache.org)
    00093  *
    00094  *
    00095  */
    00096
    00097
    00098 #ifndef DEFAULTHANDLER_HPP
    00099 #define DEFAULTHANDLER_HPP
    00100
    00101 #include <xercesc/sax2/ContentHandler.hpp>
    00102 #include <xercesc/sax2/LexicalHandler.hpp>
    00103 #include <xercesc/sax2/DeclHandler.hpp>
    00104 #include <xercesc/sax/DTDHandler.hpp>
    00105 #include <xercesc/sax/EntityResolver.hpp>
    00106 #include <xercesc/sax/ErrorHandler.hpp>
    00107 #include <xercesc/sax/SAXParseException.hpp>
    00108
    00109 XERCES_CPP_NAMESPACE_BEGIN
    00110
    00111 class Locator;
    00112 class Attributes;
    00113
    00136 class  DefaultHandler :
    00137
    00138     public EntityResolver,
    00139     public DTDHandler,
    00140     public ContentHandler,
    00141     public ErrorHandler,
    00142     public LexicalHandler,
    00143     public DeclHandler
    00144 {
    00145 public:
    00163     virtual void characters
    00164     (
    00165         const   XMLCh* const    chars
    00166         , const unsigned int    length
    00167     );
    00168
    00181     virtual void endDocument();
    00182
    00198     virtual void endElement
    00199     (
    00200         const XMLCh* const uri,
    00201         const XMLCh* const localname,
    00202         const XMLCh* const qname
    00203     );
    00204
    00220     virtual void ignorableWhitespace
    00221     (
    00222         const   XMLCh* const    chars
    00223         , const unsigned int    length
    00224     );
    00225
    00241     virtual void processingInstruction
    00242     (
    00243         const   XMLCh* const    target
    00244         , const XMLCh* const    data
    00245     );
    00246
    00252     virtual void resetDocument();
    00254
    00269     virtual void setDocumentLocator(const Locator* const locator);
    00270
    00283     virtual void startDocument();
    00284
    00301     virtual void startElement
    00302     (
    00303         const   XMLCh* const    uri,
    00304         const   XMLCh* const    localname,
    00305         const   XMLCh* const    qname
    00306         , const Attributes& attrs
    00307     );
    00308
    00324     virtual void startPrefixMapping
    00325     (
    00326         const   XMLCh* const    prefix,
    00327         const   XMLCh* const    uri
    00328     ) ;
    00329
    00344     virtual void endPrefixMapping
    00345     (
    00346         const   XMLCh* const    prefix
    00347     ) ;
    00348
    00366     virtual void skippedEntity
    00367     (
    00368         const   XMLCh* const    name
    00369     ) ;
    00370
    00372
    00397     virtual InputSource* resolveEntity
    00398     (
    00399         const   XMLCh* const    publicId
    00400         , const XMLCh* const    systemId
    00401     );
    00402
    00404
    00421     virtual void error(const SAXParseException& exception);
    00422
    00440     virtual void fatalError(const SAXParseException& exception);
    00441
    00456     virtual void warning(const SAXParseException& exception);
    00457
    00463     virtual void resetErrors();
    00464
    00466
    00467
    00470
    00484     virtual void notationDecl
    00485     (
    00486         const   XMLCh* const    name
    00487         , const XMLCh* const    publicId
    00488         , const XMLCh* const    systemId
    00489     );
    00490
    00496     virtual void resetDocType();
    00497
    00512     virtual void unparsedEntityDecl
    00513     (
    00514         const   XMLCh* const    name
    00515         , const XMLCh* const    publicId
    00516         , const XMLCh* const    systemId
    00517         , const XMLCh* const    notationName
    00518     );
    00520
    00521
    00539     virtual void comment
    00540     (
    00541         const   XMLCh* const    chars
    00542         , const unsigned int    length
    00543     );
    00544
    00554     virtual void endCDATA ();
    00555
    00565     virtual void endDTD ();
    00566
    00577     virtual void endEntity (const XMLCh* const name);
    00578
    00588     virtual void startCDATA ();
    00589
    00602     virtual void startDTD
    00603     (
    00604         const   XMLCh* const    name
    00605         , const   XMLCh* const    publicId
    00606         , const   XMLCh* const    systemId
    00607     );
    00608
    00619     virtual void startEntity (const XMLCh* const name);
    00620
    00622
    00626
    00643     virtual void elementDecl
    00644     (
    00645         const   XMLCh* const    name
    00646         , const XMLCh* const    model
    00647     );
    00648
    00663     virtual void attributeDecl
    00664     (
    00665         const   XMLCh* const    eName
    00666         , const XMLCh* const    aName
    00667         , const XMLCh* const    type
    00668         , const XMLCh* const    mode
    00669         , const XMLCh* const    value
    00670     );
    00671
    00684     virtual void internalEntityDecl
    00685     (
    00686         const   XMLCh* const    name
    00687         , const XMLCh* const    value
    00688     );
    00689
    00702     virtual void externalEntityDecl
    00703     (
    00704         const   XMLCh* const    name
    00705         , const XMLCh* const    publicId
    00706         , const XMLCh* const    systemId
    00707     );
    00708
    00710 };
    00711
    00712
    00713 // ---------------------------------------------------------------------------
    00714 //  HandlerBase: Inline default implementations
    00715 // ---------------------------------------------------------------------------
    00716 inline void DefaultHandler::characters(const   XMLCh* const
    00717                                        ,const   unsigned int)
    00718 {
    00719 }
    00720
    00721 inline void DefaultHandler::endDocument()
    00722 {
    00723 }
    00724
    00725 inline void DefaultHandler::endElement(const    XMLCh* const
    00726                                         , const XMLCh* const
    00727                                         , const XMLCh* const)
    00728 {
    00729 }
    00730
    00731 inline void DefaultHandler::error(const SAXParseException&)
    00732 {
    00733 }
    00734
    00735 inline void DefaultHandler::fatalError(const SAXParseException& exception)
    00736 {
    00737     throw exception;
    00738 }
    00739
    00740 inline void
    00741 DefaultHandler::ignorableWhitespace( const   XMLCh* const
    00742                                     , const unsigned int)
    00743 {
    00744 }
    00745
    00746 inline void DefaultHandler::notationDecl(  const   XMLCh* const
    00747                                             , const XMLCh* const
    00748                                             , const XMLCh* const)
    00749 {
    00750 }
    00751
    00752 inline void
    00753 DefaultHandler::processingInstruction( const   XMLCh* const
    00754                                         , const XMLCh* const)
    00755 {
    00756 }
    00757
    00758 inline void DefaultHandler::resetErrors()
    00759 {
    00760 }
    00761
    00762 inline void DefaultHandler::resetDocument()
    00763 {
    00764 }
    00765
    00766 inline void DefaultHandler::resetDocType()
    00767 {
    00768 }
    00769
    00770 inline InputSource*
    00771 DefaultHandler::resolveEntity( const   XMLCh* const
    00772                                 , const XMLCh* const)
    00773 {
    00774     return 0;
    00775 }
    00776
    00777 inline void
    00778 DefaultHandler::unparsedEntityDecl(const   XMLCh* const
    00779                                     , const XMLCh* const
    00780                                     , const XMLCh* const
    00781                                     , const XMLCh* const)
    00782 {
    00783 }
    00784
    00785 inline void DefaultHandler::setDocumentLocator(const Locator* const)
    00786 {
    00787 }
    00788
    00789 inline void DefaultHandler::startDocument()
    00790 {
    00791 }
    00792
    00793 inline void
    00794 DefaultHandler::startElement(  const     XMLCh* const
    00795                                 , const   XMLCh* const
    00796                                 , const   XMLCh* const
    00797                                 , const   Attributes&
    00798 )
    00799 {
    00800 }
    00801
    00802 inline void DefaultHandler::warning(const SAXParseException&)
    00803 {
    00804 }
    00805
    00806 inline void DefaultHandler::startPrefixMapping ( const  XMLCh* const
    00807                                                 ,const  XMLCh* const)
    00808 {
    00809 }
    00810
    00811 inline void DefaultHandler::endPrefixMapping ( const    XMLCh* const)
    00812 {
    00813 }
    00814
    00815 inline void DefaultHandler::skippedEntity ( const   XMLCh* const)
    00816 {
    00817 }
    00818
    00819 inline void DefaultHandler::comment(  const   XMLCh* const
    00820                                        , const unsigned int)
    00821 {
    00822 }
    00823
    00824 inline void DefaultHandler::endCDATA ()
    00825 {
    00826 }
    00827
    00828 inline void DefaultHandler::endDTD ()
    00829 {
    00830 }
    00831
    00832 inline void DefaultHandler::endEntity (const XMLCh* const)
    00833 {
    00834 }
    00835
    00836 inline void DefaultHandler::startCDATA ()
    00837 {
    00838 }
    00839
    00840 inline void DefaultHandler::startDTD(  const   XMLCh* const
    00841                                         , const   XMLCh* const
    00842                                         , const   XMLCh* const)
    00843 {
    00844 }
    00845
    00846 inline void DefaultHandler::startEntity (const XMLCh* const)
    00847 {
    00848 }
    00849
    00850 inline void DefaultHandler::attributeDecl(const XMLCh* const,
    00851                                           const XMLCh* const,
    00852                                           const XMLCh* const,
    00853                                           const XMLCh* const,
    00854                                           const XMLCh* const)
    00855 {
    00856 }
    00857
    00858 inline void DefaultHandler::elementDecl(const XMLCh* const,
    00859                                         const XMLCh* const)
    00860 {
    00861 }
    00862
    00863 inline void DefaultHandler::externalEntityDecl(const XMLCh* const,
    00864                                                const XMLCh* const,
    00865                                                const XMLCh* const)
    00866 {
    00867 }
    00868
    00869 inline void DefaultHandler::internalEntityDecl(const XMLCh* const,
    00870                                                const XMLCh* const)
    00871 {
    00872 }
    00873
    00874 XERCES_CPP_NAMESPACE_END
    00875
    00876 #endif // ! DEFAULTHANDLER_HPP

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