| 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  * Copyright 1999-2000,2004 The Apache Software Foundation.
    00003  *
    00004  * Licensed under the Apache License, Version 2.0 (the "License");
    00005  * you may not use this file except in compliance with the License.
    00006  * You may obtain a copy of the License at
    00007  *
    00008  *      http://www.apache.org/licenses/LICENSE-2.0
    00009  *
    00010  * Unless required by applicable law or agreed to in writing, software
    00011  * distributed under the License is distributed on an "AS IS" BASIS,
    00012  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    00013  * See the License for the specific language governing permissions and
    00014  * limitations under the License.
    00015  */
    00016
    00017 /*
    00018  * $Log: DefaultHandler.hpp,v $
    00019  * Revision 1.8  2004/09/08 13:56:20  peiyongz
    00020  * Apache License Version 2.0
    00021  *
    00022  * Revision 1.7  2004/01/29 11:46:32  cargilld
    00023  * Code cleanup changes to get rid of various compiler diagnostic messages.
    00024  *
    00025  * Revision 1.6  2003/12/02 14:33:13  amassari
    00026  * Don't use the word "exception" as a variable name, as VC 7.1 complains about it
    00027  *
    00028  * Revision 1.5  2002/11/04 14:55:45  tng
    00029  * C++ Namespace Support.
    00030  *
    00031  * Revision 1.4  2002/08/20 16:53:56  tng
    00032  * [Bug 6251] Info during compilation.
    00033  *
    00034  * Revision 1.3  2002/06/06 20:38:45  tng
    00035  * Document Fix: document that the returned object from resolveEntity is owned by the parser
    00036  *
    00037  * Revision 1.2  2002/02/20 18:17:02  tng
    00038  * [Bug 5977] Warnings on generating apiDocs.
    00039  *
    00040  * Revision 1.1.1.1  2002/02/01 22:22:09  peiyongz
    00041  * sane_include
    00042  *
    00043  * Revision 1.6  2002/01/28 17:08:33  knoaman
    00044  * SAX2-ext's DeclHandler support.
    00045  *
    00046  * Revision 1.5  2001/11/13 13:24:05  tng
    00047  * Fix documentation for DefaultHandler.
    00048  *
    00049  * Revision 1.4  2000/12/22 15:17:01  tng
    00050  * SAX2-ext's LexicalHandler support added by David Bertoni.
    00051  *
    00052  * Revision 1.3  2000/08/14 18:56:14  aruna1
    00053  * Virtual parameter inconsistency fixed
    00054  *
    00055  * Revision 1.2  2000/08/07 18:21:27  jpolast
    00056  * change  module to
    00057  *
    00058  * Revision 1.1  2000/08/02 18:02:34  jpolast
    00059  * initial checkin of sax2 implementation
    00060  * submitted by Simon Fell (simon@fell.com)
    00061  * and Joe Polastre (jpolast@apache.org)
    00062  *
    00063  *
    00064  */
    00065
    00066
    00067 #ifndef DEFAULTHANDLER_HPP
    00068 #define DEFAULTHANDLER_HPP
    00069
    00070 #include <xercesc/sax2/ContentHandler.hpp>
    00071 #include <xercesc/sax2/LexicalHandler.hpp>
    00072 #include <xercesc/sax2/DeclHandler.hpp>
    00073 #include <xercesc/sax/DTDHandler.hpp>
    00074 #include <xercesc/sax/EntityResolver.hpp>
    00075 #include <xercesc/sax/ErrorHandler.hpp>
    00076 #include <xercesc/sax/SAXParseException.hpp>
    00077
    00078 XERCES_CPP_NAMESPACE_BEGIN
    00079
    00080 class Locator;
    00081 class Attributes;
    00082
    00105 class  DefaultHandler :
    00106
    00107     public EntityResolver,
    00108     public DTDHandler,
    00109     public ContentHandler,
    00110     public ErrorHandler,
    00111     public LexicalHandler,
    00112     public DeclHandler
    00113 {
    00114 public:
    00132     virtual void characters
    00133     (
    00134         const   XMLCh* const    chars
    00135         , const unsigned int    length
    00136     );
    00137
    00150     virtual void endDocument();
    00151
    00167     virtual void endElement
    00168     (
    00169         const XMLCh* const uri,
    00170         const XMLCh* const localname,
    00171         const XMLCh* const qname
    00172     );
    00173
    00189     virtual void ignorableWhitespace
    00190     (
    00191         const   XMLCh* const    chars
    00192         , const unsigned int    length
    00193     );
    00194
    00210     virtual void processingInstruction
    00211     (
    00212         const   XMLCh* const    target
    00213         , const XMLCh* const    data
    00214     );
    00215
    00221     virtual void resetDocument();
    00223
    00238     virtual void setDocumentLocator(const Locator* const locator);
    00239
    00252     virtual void startDocument();
    00253
    00270     virtual void startElement
    00271     (
    00272         const   XMLCh* const    uri,
    00273         const   XMLCh* const    localname,
    00274         const   XMLCh* const    qname
    00275         , const Attributes& attrs
    00276     );
    00277
    00293     virtual void startPrefixMapping
    00294     (
    00295         const   XMLCh* const    prefix,
    00296         const   XMLCh* const    uri
    00297     ) ;
    00298
    00313     virtual void endPrefixMapping
    00314     (
    00315         const   XMLCh* const    prefix
    00316     ) ;
    00317
    00335     virtual void skippedEntity
    00336     (
    00337         const   XMLCh* const    name
    00338     ) ;
    00339
    00341
    00366     virtual InputSource* resolveEntity
    00367     (
    00368         const   XMLCh* const    publicId
    00369         , const XMLCh* const    systemId
    00370     );
    00371
    00373
    00390     virtual void error(const SAXParseException& exc);
    00391
    00409     virtual void fatalError(const SAXParseException& exc);
    00410
    00425     virtual void warning(const SAXParseException& exc);
    00426
    00432     virtual void resetErrors();
    00433
    00435
    00436
    00439
    00453     virtual void notationDecl
    00454     (
    00455         const   XMLCh* const    name
    00456         , const XMLCh* const    publicId
    00457         , const XMLCh* const    systemId
    00458     );
    00459
    00465     virtual void resetDocType();
    00466
    00481     virtual void unparsedEntityDecl
    00482     (
    00483         const   XMLCh* const    name
    00484         , const XMLCh* const    publicId
    00485         , const XMLCh* const    systemId
    00486         , const XMLCh* const    notationName
    00487     );
    00489
    00490
    00508     virtual void comment
    00509     (
    00510         const   XMLCh* const    chars
    00511         , const unsigned int    length
    00512     );
    00513
    00523     virtual void endCDATA ();
    00524
    00534     virtual void endDTD ();
    00535
    00546     virtual void endEntity (const XMLCh* const name);
    00547
    00557     virtual void startCDATA ();
    00558
    00571     virtual void startDTD
    00572     (
    00573         const   XMLCh* const    name
    00574         , const   XMLCh* const    publicId
    00575         , const   XMLCh* const    systemId
    00576     );
    00577
    00588     virtual void startEntity (const XMLCh* const name);
    00589
    00591
    00595
    00612     virtual void elementDecl
    00613     (
    00614         const   XMLCh* const    name
    00615         , const XMLCh* const    model
    00616     );
    00617
    00632     virtual void attributeDecl
    00633     (
    00634         const   XMLCh* const    eName
    00635         , const XMLCh* const    aName
    00636         , const XMLCh* const    type
    00637         , const XMLCh* const    mode
    00638         , const XMLCh* const    value
    00639     );
    00640
    00653     virtual void internalEntityDecl
    00654     (
    00655         const   XMLCh* const    name
    00656         , const XMLCh* const    value
    00657     );
    00658
    00671     virtual void externalEntityDecl
    00672     (
    00673         const   XMLCh* const    name
    00674         , const XMLCh* const    publicId
    00675         , const XMLCh* const    systemId
    00676     );
    00677
    00679
    00680     DefaultHandler() {};
    00681     virtual ~DefaultHandler() {};
    00682
    00683 private:
    00684     // -----------------------------------------------------------------------
    00685     //  Unimplemented constructors and operators
    00686     // -----------------------------------------------------------------------
    00687     DefaultHandler(const DefaultHandler&);
    00688     DefaultHandler& operator=(const DefaultHandler&);
    00689 };
    00690
    00691
    00692 // ---------------------------------------------------------------------------
    00693 //  HandlerBase: Inline default implementations
    00694 // ---------------------------------------------------------------------------
    00695 inline void DefaultHandler::characters(const   XMLCh* const
    00696                                        ,const   unsigned int)
    00697 {
    00698 }
    00699
    00700 inline void DefaultHandler::endDocument()
    00701 {
    00702 }
    00703
    00704 inline void DefaultHandler::endElement(const    XMLCh* const
    00705                                         , const XMLCh* const
    00706                                         , const XMLCh* const)
    00707 {
    00708 }
    00709
    00710 inline void DefaultHandler::error(const SAXParseException&)
    00711 {
    00712 }
    00713
    00714 inline void DefaultHandler::fatalError(const SAXParseException& exc)
    00715 {
    00716     throw exc;
    00717 }
    00718
    00719 inline void
    00720 DefaultHandler::ignorableWhitespace( const   XMLCh* const
    00721                                     , const unsigned int)
    00722 {
    00723 }
    00724
    00725 inline void DefaultHandler::notationDecl(  const   XMLCh* const
    00726                                             , const XMLCh* const
    00727                                             , const XMLCh* const)
    00728 {
    00729 }
    00730
    00731 inline void
    00732 DefaultHandler::processingInstruction( const   XMLCh* const
    00733                                         , const XMLCh* const)
    00734 {
    00735 }
    00736
    00737 inline void DefaultHandler::resetErrors()
    00738 {
    00739 }
    00740
    00741 inline void DefaultHandler::resetDocument()
    00742 {
    00743 }
    00744
    00745 inline void DefaultHandler::resetDocType()
    00746 {
    00747 }
    00748
    00749 inline InputSource*
    00750 DefaultHandler::resolveEntity( const   XMLCh* const
    00751                                 , const XMLCh* const)
    00752 {
    00753     return 0;
    00754 }
    00755
    00756 inline void
    00757 DefaultHandler::unparsedEntityDecl(const   XMLCh* const
    00758                                     , const XMLCh* const
    00759                                     , const XMLCh* const
    00760                                     , const XMLCh* const)
    00761 {
    00762 }
    00763
    00764 inline void DefaultHandler::setDocumentLocator(const Locator* const)
    00765 {
    00766 }
    00767
    00768 inline void DefaultHandler::startDocument()
    00769 {
    00770 }
    00771
    00772 inline void
    00773 DefaultHandler::startElement(  const     XMLCh* const
    00774                                 , const   XMLCh* const
    00775                                 , const   XMLCh* const
    00776                                 , const   Attributes&
    00777 )
    00778 {
    00779 }
    00780
    00781 inline void DefaultHandler::warning(const SAXParseException&)
    00782 {
    00783 }
    00784
    00785 inline void DefaultHandler::startPrefixMapping ( const  XMLCh* const
    00786                                                 ,const  XMLCh* const)
    00787 {
    00788 }
    00789
    00790 inline void DefaultHandler::endPrefixMapping ( const    XMLCh* const)
    00791 {
    00792 }
    00793
    00794 inline void DefaultHandler::skippedEntity ( const   XMLCh* const)
    00795 {
    00796 }
    00797
    00798 inline void DefaultHandler::comment(  const   XMLCh* const
    00799                                        , const unsigned int)
    00800 {
    00801 }
    00802
    00803 inline void DefaultHandler::endCDATA ()
    00804 {
    00805 }
    00806
    00807 inline void DefaultHandler::endDTD ()
    00808 {
    00809 }
    00810
    00811 inline void DefaultHandler::endEntity (const XMLCh* const)
    00812 {
    00813 }
    00814
    00815 inline void DefaultHandler::startCDATA ()
    00816 {
    00817 }
    00818
    00819 inline void DefaultHandler::startDTD(  const   XMLCh* const
    00820                                         , const   XMLCh* const
    00821                                         , const   XMLCh* const)
    00822 {
    00823 }
    00824
    00825 inline void DefaultHandler::startEntity (const XMLCh* const)
    00826 {
    00827 }
    00828
    00829 inline void DefaultHandler::attributeDecl(const XMLCh* const,
    00830                                           const XMLCh* const,
    00831                                           const XMLCh* const,
    00832                                           const XMLCh* const,
    00833                                           const XMLCh* const)
    00834 {
    00835 }
    00836
    00837 inline void DefaultHandler::elementDecl(const XMLCh* const,
    00838                                         const XMLCh* const)
    00839 {
    00840 }
    00841
    00842 inline void DefaultHandler::externalEntityDecl(const XMLCh* const,
    00843                                                const XMLCh* const,
    00844                                                const XMLCh* const)
    00845 {
    00846 }
    00847
    00848 inline void DefaultHandler::internalEntityDecl(const XMLCh* const,
    00849                                                const XMLCh* const)
    00850 {
    00851 }
    00852
    00853 XERCES_CPP_NAMESPACE_END
    00854
    00855 #endif // ! DEFAULTHANDLER_HPP

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