00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
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
00723
00724 DefaultHandler(const DefaultHandler&);
00725 DefaultHandler& operator=(const DefaultHandler&);
00726 };
00727
00728
00729
00730
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