Main Page   Class Hierarchy   Compound List   File List   Compound Members  

DefaultHandler.hpp

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.1  2002/05/11 20:24:42  bhavani
00060  * CR#CR062582# adding xercesc 1.7 file
00061  *
00062  * Revision 1.2  2002/02/20 18:17:02  tng
00063  * [Bug 5977] Warnings on generating apiDocs.
00064  *
00065  * Revision 1.1.1.1  2002/02/01 22:22:09  peiyongz
00066  * sane_include
00067  *
00068  * Revision 1.6  2002/01/28 17:08:33  knoaman
00069  * SAX2-ext's DeclHandler support.
00070  *
00071  * Revision 1.5  2001/11/13 13:24:05  tng
00072  * Fix documentation for DefaultHandler.
00073  *
00074  * Revision 1.4  2000/12/22 15:17:01  tng
00075  * SAX2-ext's LexicalHandler support added by David Bertoni.
00076  *
00077  * Revision 1.3  2000/08/14 18:56:14  aruna1
00078  * Virtual parameter inconsistency fixed
00079  *
00080  * Revision 1.2  2000/08/07 18:21:27  jpolast
00081  * change SAX_EXPORT module to SAX2_EXPORT
00082  *
00083  * Revision 1.1  2000/08/02 18:02:34  jpolast
00084  * initial checkin of sax2 implementation
00085  * submitted by Simon Fell (simon@fell.com)
00086  * and Joe Polastre (jpolast@apache.org)
00087  *
00088  *
00089  */
00090 
00091 
00092 #ifndef DEFAULTHANDLER_HPP
00093 #define DEFAULTHANDLER_HPP
00094 
00095 #include <xercesc/sax2/ContentHandler.hpp>
00096 #include <xercesc/sax2/LexicalHandler.hpp>
00097 #include <xercesc/sax2/DeclHandler.hpp>
00098 #include <xercesc/sax/DTDHandler.hpp>
00099 #include <xercesc/sax/EntityResolver.hpp>
00100 #include <xercesc/sax/ErrorHandler.hpp>
00101 #include <xercesc/sax/SAXParseException.hpp>
00102 
00103 class Locator;
00104 class Attributes;
00105 
00128 class SAX2_EXPORT DefaultHandler :
00129 
00130     public EntityResolver,
00131         public DTDHandler,
00132         public ContentHandler,
00133     public ErrorHandler,
00134     public LexicalHandler,
00135     public DeclHandler
00136 {
00137 public:
00155     virtual void characters
00156     (
00157         const   XMLCh* const    chars
00158         , const unsigned int    length
00159     );
00160 
00173     virtual void endDocument();
00174 
00190     virtual void endElement
00191         (
00192                 const XMLCh* const uri,
00193                 const XMLCh* const localname,
00194                 const XMLCh* const qname
00195         );
00196 
00212     virtual void ignorableWhitespace
00213     (
00214         const   XMLCh* const    chars
00215         , const unsigned int    length
00216     );
00217 
00233     virtual void processingInstruction
00234     (
00235         const   XMLCh* const    target
00236         , const XMLCh* const    data
00237     );
00238 
00244     virtual void resetDocument();
00246 
00261     virtual void setDocumentLocator(const Locator* const locator);
00262 
00275     virtual void startDocument();
00276 
00293     virtual void startElement
00294     (
00295         const   XMLCh* const    uri,
00296         const   XMLCh* const    localname,
00297         const   XMLCh* const    qname
00298         , const Attributes&     attrs
00299     );
00300 
00316         virtual void startPrefixMapping
00317         (
00318                 const   XMLCh* const    prefix,
00319                 const   XMLCh* const    uri
00320         ) ;
00321 
00336         virtual void endPrefixMapping
00337         (
00338                 const   XMLCh* const    prefix
00339         ) ;
00340 
00358         virtual void skippedEntity
00359         (
00360                 const   XMLCh* const    name
00361         ) ;
00362 
00364 
00387     virtual InputSource* resolveEntity
00388     (
00389         const   XMLCh* const    publicId
00390         , const XMLCh* const    systemId
00391     );
00392 
00394 
00411     virtual void error(const SAXParseException& exception);
00412 
00430     virtual void fatalError(const SAXParseException& exception);
00431 
00446     virtual void warning(const SAXParseException& exception);
00447 
00453     virtual void resetErrors();
00454 
00456 
00457 
00460 
00474     virtual void notationDecl
00475     (
00476         const   XMLCh* const    name
00477         , const XMLCh* const    publicId
00478         , const XMLCh* const    systemId
00479     );
00480 
00486     virtual void resetDocType();
00487 
00502     virtual void unparsedEntityDecl
00503     (
00504         const   XMLCh* const    name
00505         , const XMLCh* const    publicId
00506         , const XMLCh* const    systemId
00507         , const XMLCh* const    notationName
00508     );
00510 
00511 
00529     virtual void comment
00530     (
00531         const   XMLCh* const    chars
00532         , const unsigned int    length
00533     );
00534 
00544     virtual void endCDATA ();
00545 
00555     virtual void endDTD ();
00556 
00567     virtual void endEntity (const XMLCh* const name);
00568 
00578     virtual void startCDATA ();
00579 
00592     virtual void startDTD
00593     (
00594         const   XMLCh* const    name
00595         , const   XMLCh* const    publicId
00596         , const   XMLCh* const    systemId
00597     );
00598 
00609     virtual void startEntity (const XMLCh* const name);
00610 
00612 
00616 
00633     virtual void elementDecl
00634     (
00635         const   XMLCh* const    name
00636         , const XMLCh* const    model
00637     );
00638 
00653     virtual void attributeDecl
00654     (
00655         const   XMLCh* const    eName
00656         , const XMLCh* const    aName
00657         , const XMLCh* const    type
00658         , const XMLCh* const    mode
00659         , const XMLCh* const    value
00660     );
00661 
00674     virtual void internalEntityDecl
00675     (
00676         const   XMLCh* const    name
00677         , const XMLCh* const    value
00678     );
00679 
00692     virtual void externalEntityDecl
00693     (
00694         const   XMLCh* const    name
00695         , const XMLCh* const    publicId
00696         , const XMLCh* const    systemId
00697     );
00698 
00700 };
00701 
00702 
00703 // ---------------------------------------------------------------------------
00704 //  HandlerBase: Inline default implementations
00705 // ---------------------------------------------------------------------------
00706 inline void DefaultHandler::characters(const   XMLCh* const    chars
00707                                        ,const   unsigned int    length)
00708 {
00709 }
00710 
00711 inline void DefaultHandler::endDocument()
00712 {
00713 }
00714 
00715 inline void DefaultHandler::endElement(const    XMLCh* const uri
00716                                                                                 , const XMLCh* const localname
00717                                                                                 , const XMLCh* const qname)
00718 {
00719 }
00720 
00721 inline void DefaultHandler::error(const SAXParseException& exception)
00722 {
00723 }
00724 
00725 inline void DefaultHandler::fatalError(const SAXParseException& exception)
00726 {
00727     throw exception;
00728 }
00729 
00730 inline void
00731 DefaultHandler::ignorableWhitespace( const   XMLCh* const       chars
00732                                     , const unsigned int        length)
00733 {
00734 }
00735 
00736 inline void DefaultHandler::notationDecl(  const   XMLCh* const name
00737                                                                                         , const XMLCh* const publicId
00738                                                                                         , const XMLCh* const systemId)
00739 {
00740 }
00741 
00742 inline void
00743 DefaultHandler::processingInstruction( const   XMLCh* const target
00744                                                                                 , const XMLCh* const data)
00745 {
00746 }
00747 
00748 inline void DefaultHandler::resetErrors()
00749 {
00750 }
00751 
00752 inline void DefaultHandler::resetDocument()
00753 {
00754 }
00755 
00756 inline void DefaultHandler::resetDocType()
00757 {
00758 }
00759 
00760 inline InputSource*
00761 DefaultHandler::resolveEntity( const   XMLCh* const publicId
00762                                                                 , const XMLCh* const systemId)
00763 {
00764     return 0;
00765 }
00766 
00767 inline void
00768 DefaultHandler::unparsedEntityDecl(const   XMLCh* const name
00769                                                                         , const XMLCh* const publicId
00770                                                                         , const XMLCh* const systemId
00771                                                                         , const XMLCh* const notationName)
00772 {
00773 }
00774 
00775 inline void DefaultHandler::setDocumentLocator(const Locator* const locator)
00776 {
00777 }
00778 
00779 inline void DefaultHandler::startDocument()
00780 {
00781 }
00782 
00783 inline void
00784 DefaultHandler::startElement(  const     XMLCh* const  uri
00785                                                                 , const   XMLCh* const  localname
00786                                                                 , const   XMLCh* const  qname
00787                                                                 , const   Attributes&           attrs
00788 )
00789 {
00790 }
00791 
00792 inline void DefaultHandler::warning(const SAXParseException& exception)
00793 {
00794 }
00795 
00796 inline void DefaultHandler::startPrefixMapping ( const  XMLCh* const    prefix
00797                                                                                                 ,const  XMLCh* const    uri)
00798 {
00799 }
00800 
00801 inline void DefaultHandler::endPrefixMapping ( const    XMLCh* const    prefix )
00802 {
00803 }
00804 
00805 inline void DefaultHandler::skippedEntity ( const       XMLCh* const    name )
00806 {
00807 }
00808 
00809 inline void DefaultHandler::comment(  const   XMLCh* const    chars
00810                                        , const unsigned int    length)
00811 {
00812 }
00813 
00814 inline void DefaultHandler::endCDATA ()
00815 {
00816 }
00817 
00818 inline void DefaultHandler::endDTD ()
00819 {
00820 }
00821 
00822 inline void DefaultHandler::endEntity (const XMLCh* const name)
00823 {
00824 }
00825 
00826 inline void DefaultHandler::startCDATA ()
00827 {
00828 }
00829 
00830 inline void DefaultHandler::startDTD(  const   XMLCh* const    name
00831                                         , const   XMLCh* const publicId
00832                                         , const   XMLCh* const systemId)
00833 {
00834 }
00835 
00836 inline void DefaultHandler::startEntity (const XMLCh* const name)
00837 {
00838 }
00839 
00840 inline void DefaultHandler::attributeDecl(const XMLCh* const,
00841                                           const XMLCh* const,
00842                                           const XMLCh* const,
00843                                           const XMLCh* const,
00844                                           const XMLCh* const)
00845 {
00846 }
00847 
00848 inline void DefaultHandler::elementDecl(const XMLCh* const,
00849                                         const XMLCh* const)
00850 {
00851 }
00852 
00853 inline void DefaultHandler::externalEntityDecl(const XMLCh* const,
00854                                                const XMLCh* const,
00855                                                const XMLCh* const)
00856 {
00857 }
00858 
00859 inline void DefaultHandler::internalEntityDecl(const XMLCh* const,
00860                                                const XMLCh* const)
00861 {
00862 }
00863 
00864 #endif // ! DEFAULTHANDLER_HPP

Generated on Tue Nov 19 09:36:27 2002 by doxygen1.3-rc1