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 #ifndef HANDLERBASE_HPP
00095 #define HANDLERBASE_HPP
00096
00097 #include <xercesc/sax/DocumentHandler.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 AttributeList;
00105
00126 class SAX_EXPORT HandlerBase :
00127
00128 public EntityResolver, public DTDHandler, public DocumentHandler
00129 , public ErrorHandler
00130 {
00131 public:
00149 virtual void characters
00150 (
00151 const XMLCh* const chars
00152 , const unsigned int length
00153 );
00154
00167 virtual void endDocument();
00168
00182 virtual void endElement(const XMLCh* const name);
00183
00199 virtual void ignorableWhitespace
00200 (
00201 const XMLCh* const chars
00202 , const unsigned int length
00203 );
00204
00220 virtual void processingInstruction
00221 (
00222 const XMLCh* const target
00223 , const XMLCh* const data
00224 );
00225
00231 virtual void resetDocument();
00233
00248 virtual void setDocumentLocator(const Locator* const locator);
00249
00262 virtual void startDocument();
00263
00278 virtual void startElement
00279 (
00280 const XMLCh* const name
00281 , AttributeList& attributes
00282 );
00283
00285
00308 virtual InputSource* resolveEntity
00309 (
00310 const XMLCh* const publicId
00311 , const XMLCh* const systemId
00312 );
00313
00315
00332 virtual void error(const SAXParseException& exception);
00333
00351 virtual void fatalError(const SAXParseException& exception);
00352
00367 virtual void warning(const SAXParseException& exception);
00368
00374 virtual void resetErrors();
00375
00377
00378
00381
00395 virtual void notationDecl
00396 (
00397 const XMLCh* const name
00398 , const XMLCh* const publicId
00399 , const XMLCh* const systemId
00400 );
00401
00407 virtual void resetDocType();
00408
00423 virtual void unparsedEntityDecl
00424 (
00425 const XMLCh* const name
00426 , const XMLCh* const publicId
00427 , const XMLCh* const systemId
00428 , const XMLCh* const notationName
00429 );
00431 };
00432
00433
00434
00435
00436
00437 inline void HandlerBase::characters(const XMLCh* const chars
00438 , const unsigned int length)
00439 {
00440 }
00441
00442 inline void HandlerBase::endDocument()
00443 {
00444 }
00445
00446 inline void HandlerBase::endElement(const XMLCh* const name)
00447 {
00448 }
00449
00450 inline void HandlerBase::error(const SAXParseException& exception)
00451 {
00452 }
00453
00454 inline void HandlerBase::fatalError(const SAXParseException& exception)
00455 {
00456 throw exception;
00457 }
00458
00459 inline void
00460 HandlerBase::ignorableWhitespace( const XMLCh* const chars
00461 , const unsigned int length)
00462 {
00463 }
00464
00465 inline void HandlerBase::notationDecl( const XMLCh* const name
00466 , const XMLCh* const publicId
00467 , const XMLCh* const systemId)
00468 {
00469 }
00470
00471 inline void
00472 HandlerBase::processingInstruction( const XMLCh* const target
00473 , const XMLCh* const data)
00474 {
00475 }
00476
00477 inline void HandlerBase::resetErrors()
00478 {
00479 }
00480
00481 inline void HandlerBase::resetDocument()
00482 {
00483 }
00484
00485 inline void HandlerBase::resetDocType()
00486 {
00487 }
00488
00489 inline InputSource*
00490 HandlerBase::resolveEntity( const XMLCh* const publicId
00491 , const XMLCh* const systemId)
00492 {
00493 return 0;
00494 }
00495
00496 inline void
00497 HandlerBase::unparsedEntityDecl(const XMLCh* const name
00498 , const XMLCh* const publicId
00499 , const XMLCh* const systemId
00500 , const XMLCh* const notationName)
00501 {
00502 }
00503
00504 inline void HandlerBase::setDocumentLocator(const Locator* const locator)
00505 {
00506 }
00507
00508 inline void HandlerBase::startDocument()
00509 {
00510 }
00511
00512 inline void
00513 HandlerBase::startElement( const XMLCh* const name
00514 , AttributeList& attributes)
00515 {
00516 }
00517
00518 inline void HandlerBase::warning(const SAXParseException& exception)
00519 {
00520 }
00521
00522 #endif