http://xml.apache.org/http://www.apache.org/http://www.w3.org/

Home

Readme
Download
Installation
Build

API Docs
Samples
Schema

FAQs
Programming
Migration

Releases
Bug-Reporting
Feedback

Y2K Compliance
PDF Document

CVS Repository
Mail Archive

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.2  2002/02/20 18:17:02  tng
00060  * [Bug 5977] Warnings on generating apiDocs.
00061  *
00062  * Revision 1.1.1.1  2002/02/01 22:22:09  peiyongz
00063  * sane_include
00064  *
00065  * Revision 1.6  2002/01/28 17:08:33  knoaman
00066  * SAX2-ext's DeclHandler support.
00067  *
00068  * Revision 1.5  2001/11/13 13:24:05  tng
00069  * Fix documentation for DefaultHandler.
00070  *
00071  * Revision 1.4  2000/12/22 15:17:01  tng
00072  * SAX2-ext's LexicalHandler support added by David Bertoni.
00073  *
00074  * Revision 1.3  2000/08/14 18:56:14  aruna1
00075  * Virtual parameter inconsistency fixed
00076  *
00077  * Revision 1.2  2000/08/07 18:21:27  jpolast
00078  * change  module to 
00079  *
00080  * Revision 1.1  2000/08/02 18:02:34  jpolast
00081  * initial checkin of sax2 implementation
00082  * submitted by Simon Fell (simon@fell.com)
00083  * and Joe Polastre (jpolast@apache.org)
00084  *
00085  *
00086  */
00087 
00088 
00089 #ifndef DEFAULTHANDLER_HPP
00090 #define DEFAULTHANDLER_HPP
00091 
00092 #include <xercesc/sax2/ContentHandler.hpp>
00093 #include <xercesc/sax2/LexicalHandler.hpp>
00094 #include <xercesc/sax2/DeclHandler.hpp>
00095 #include <xercesc/sax/DTDHandler.hpp>
00096 #include <xercesc/sax/EntityResolver.hpp>
00097 #include <xercesc/sax/ErrorHandler.hpp>
00098 #include <xercesc/sax/SAXParseException.hpp>
00099 
00100 class Locator;
00101 class Attributes;
00102 
00124 
00125 class  DefaultHandler :
00126 
00127     public EntityResolver,
00128     public DTDHandler,
00129     public ContentHandler,
00130     public ErrorHandler,
00131     public LexicalHandler,
00132     public DeclHandler
00133 {
00134 public:
00137 
00152     virtual void characters
00153     (
00154         const   XMLCh* const    chars
00155         , const unsigned int    length
00156     );
00157 
00170     virtual void endDocument();
00171 
00187     virtual void endElement
00188     (
00189         const XMLCh* const uri,
00190         const XMLCh* const localname,
00191         const XMLCh* const qname
00192     );
00193 
00209     virtual void ignorableWhitespace
00210     (
00211         const   XMLCh* const    chars
00212         , const unsigned int    length
00213     );
00214 
00230     virtual void processingInstruction
00231     (
00232         const   XMLCh* const    target
00233         , const XMLCh* const    data
00234     );
00235 
00241     virtual void resetDocument();
00243 
00245 
00247 
00258     virtual void setDocumentLocator(const Locator* const locator);
00259 
00272     virtual void startDocument();
00273 
00290     virtual void startElement
00291     (
00292         const   XMLCh* const    uri,
00293         const   XMLCh* const    localname,
00294         const   XMLCh* const    qname
00295         , const Attributes& attrs
00296     );
00297 
00313     virtual void startPrefixMapping
00314     (
00315         const   XMLCh* const    prefix,
00316         const   XMLCh* const    uri
00317     ) ;
00318 
00333     virtual void endPrefixMapping
00334     (
00335         const   XMLCh* const    prefix
00336     ) ;
00337 
00355     virtual void skippedEntity
00356     (
00357         const   XMLCh* const    name
00358     ) ;
00359 
00361 
00363 
00365 
00384     virtual InputSource* resolveEntity
00385     (
00386         const   XMLCh* const    publicId
00387         , const XMLCh* const    systemId
00388     );
00389 
00391 
00394 
00408     virtual void error(const SAXParseException& exception);
00409 
00427     virtual void fatalError(const SAXParseException& exception);
00428 
00443     virtual void warning(const SAXParseException& exception);
00444 
00450     virtual void resetErrors();
00451 
00453 
00454 
00457 
00471     virtual void notationDecl
00472     (
00473         const   XMLCh* const    name
00474         , const XMLCh* const    publicId
00475         , const XMLCh* const    systemId
00476     );
00477 
00483     virtual void resetDocType();
00484 
00499     virtual void unparsedEntityDecl
00500     (
00501         const   XMLCh* const    name
00502         , const XMLCh* const    publicId
00503         , const XMLCh* const    systemId
00504         , const XMLCh* const    notationName
00505     );
00507 
00508 
00510 
00512 
00526     virtual void comment
00527     (
00528         const   XMLCh* const    chars
00529         , const unsigned int    length
00530     );
00531 
00541     virtual void endCDATA ();
00542 
00552     virtual void endDTD ();
00553 
00564     virtual void endEntity (const XMLCh* const name);
00565 
00575     virtual void startCDATA ();
00576 
00589     virtual void startDTD
00590     (
00591         const   XMLCh* const    name
00592         , const   XMLCh* const    publicId
00593         , const   XMLCh* const    systemId
00594     );
00595 
00606     virtual void startEntity (const XMLCh* const name);
00607 
00609 
00611 
00613 
00630     virtual void elementDecl
00631     (
00632         const   XMLCh* const    name
00633         , const XMLCh* const    model
00634     );
00635 
00650     virtual void attributeDecl
00651     (
00652         const   XMLCh* const    eName
00653         , const XMLCh* const    aName
00654         , const XMLCh* const    type
00655         , const XMLCh* const    mode
00656         , const XMLCh* const    value
00657     );
00658 
00671     virtual void internalEntityDecl
00672     (
00673         const   XMLCh* const    name
00674         , const XMLCh* const    value
00675     );
00676 
00689     virtual void externalEntityDecl
00690     (
00691         const   XMLCh* const    name
00692         , const XMLCh* const    publicId
00693         , const XMLCh* const    systemId
00694     );
00695 
00697 };
00698 
00699 
00700 // ---------------------------------------------------------------------------
00701 //  HandlerBase: Inline default implementations
00702 // ---------------------------------------------------------------------------
00703 inline void DefaultHandler::characters(const   XMLCh* const    chars
00704                                        ,const   unsigned int    length)
00705 {
00706 }
00707 
00708 inline void DefaultHandler::endDocument()
00709 {
00710 }
00711 
00712 inline void DefaultHandler::endElement(const    XMLCh* const uri
00713                                         , const XMLCh* const localname
00714                                         , const XMLCh* const qname)
00715 {
00716 }
00717 
00718 inline void DefaultHandler::error(const SAXParseException& exception)
00719 {
00720 }
00721 
00722 inline void DefaultHandler::fatalError(const SAXParseException& exception)
00723 {
00724     throw exception;
00725 }
00726 
00727 inline void
00728 DefaultHandler::ignorableWhitespace( const   XMLCh* const   chars
00729                                     , const unsigned int    length)
00730 {
00731 }
00732 
00733 inline void DefaultHandler::notationDecl(  const   XMLCh* const name
00734                                             , const XMLCh* const publicId
00735                                             , const XMLCh* const systemId)
00736 {
00737 }
00738 
00739 inline void
00740 DefaultHandler::processingInstruction( const   XMLCh* const target
00741                                         , const XMLCh* const data)
00742 {
00743 }
00744 
00745 inline void DefaultHandler::resetErrors()
00746 {
00747 }
00748 
00749 inline void DefaultHandler::resetDocument()
00750 {
00751 }
00752 
00753 inline void DefaultHandler::resetDocType()
00754 {
00755 }
00756 
00757 inline InputSource*
00758 DefaultHandler::resolveEntity( const   XMLCh* const publicId
00759                                 , const XMLCh* const systemId)
00760 {
00761     return 0;
00762 }
00763 
00764 inline void
00765 DefaultHandler::unparsedEntityDecl(const   XMLCh* const name
00766                                     , const XMLCh* const publicId
00767                                     , const XMLCh* const systemId
00768                                     , const XMLCh* const notationName)
00769 {
00770 }
00771 
00772 inline void DefaultHandler::setDocumentLocator(const Locator* const locator)
00773 {
00774 }
00775 
00776 inline void DefaultHandler::startDocument()
00777 {
00778 }
00779 
00780 inline void
00781 DefaultHandler::startElement(  const     XMLCh* const  uri
00782                                 , const   XMLCh* const  localname
00783                                 , const   XMLCh* const  qname
00784                                 , const   Attributes&       attrs
00785 )
00786 {
00787 }
00788 
00789 inline void DefaultHandler::warning(const SAXParseException& exception)
00790 {
00791 }
00792 
00793 inline void DefaultHandler::startPrefixMapping ( const  XMLCh* const    prefix
00794                                                 ,const  XMLCh* const    uri)
00795 {
00796 }
00797 
00798 inline void DefaultHandler::endPrefixMapping ( const    XMLCh* const    prefix )
00799 {
00800 }
00801 
00802 inline void DefaultHandler::skippedEntity ( const   XMLCh* const    name )
00803 {
00804 }
00805 
00806 inline void DefaultHandler::comment(  const   XMLCh* const    chars
00807                                        , const unsigned int    length)
00808 {
00809 }
00810 
00811 inline void DefaultHandler::endCDATA ()
00812 {
00813 }
00814 
00815 inline void DefaultHandler::endDTD ()
00816 {
00817 }
00818 
00819 inline void DefaultHandler::endEntity (const XMLCh* const name)
00820 {
00821 }
00822 
00823 inline void DefaultHandler::startCDATA ()
00824 {
00825 }
00826 
00827 inline void DefaultHandler::startDTD(  const   XMLCh* const    name
00828                                         , const   XMLCh* const publicId
00829                                         , const   XMLCh* const systemId)
00830 {
00831 }
00832 
00833 inline void DefaultHandler::startEntity (const XMLCh* const name)
00834 {
00835 }
00836 
00837 inline void DefaultHandler::attributeDecl(const XMLCh* const,
00838                                           const XMLCh* const,
00839                                           const XMLCh* const,
00840                                           const XMLCh* const,
00841                                           const XMLCh* const)
00842 {
00843 }
00844 
00845 inline void DefaultHandler::elementDecl(const XMLCh* const,
00846                                         const XMLCh* const)
00847 {
00848 }
00849 
00850 inline void DefaultHandler::externalEntityDecl(const XMLCh* const,
00851                                                const XMLCh* const,
00852                                                const XMLCh* const)
00853 {
00854 }
00855 
00856 inline void DefaultHandler::internalEntityDecl(const XMLCh* const,
00857                                                const XMLCh* const)
00858 {
00859 }
00860 
00861 #endif // ! DEFAULTHANDLER_HPP


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