20 #ifndef _EVENTHANDLER_HPP
21 #define _EVENTHANDLER_HPP
23 #include <xqilla/framework/XQillaExport.hpp>
27 #include <xercesc/util/XercesDefs.hpp>
39 virtual void startDocumentEvent(
const XMLCh *documentURI,
const XMLCh *encoding) = 0;
41 virtual void endDocumentEvent() = 0;
43 virtual void startElementEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname) = 0;
45 virtual void endElementEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname,
46 const XMLCh *typeURI,
const XMLCh *typeName) = 0;
48 virtual void piEvent(
const XMLCh *target,
const XMLCh *value) = 0;
50 virtual void textEvent(
const XMLCh *value) = 0;
52 virtual void textEvent(
const XMLCh *chars,
unsigned int length) = 0;
54 virtual void commentEvent(
const XMLCh *value) = 0;
56 virtual void attributeEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname,
const XMLCh *value,
57 const XMLCh *typeURI,
const XMLCh *typeName) = 0;
59 virtual void namespaceEvent(
const XMLCh *prefix,
const XMLCh *uri) = 0;
62 const XMLCh *typeURI,
const XMLCh *typeName) {}
64 virtual void endEvent() = 0;
82 next_->setLocationInfo(location);
87 next_->startDocumentEvent(documentURI, encoding);
92 next_->endDocumentEvent();
95 virtual void startElementEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname)
97 next_->startElementEvent(prefix, uri, localname);
100 virtual void endElementEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname,
101 const XMLCh *typeURI,
const XMLCh *typeName)
103 next_->endElementEvent(prefix, uri, localname, typeURI, typeName);
106 virtual void piEvent(
const XMLCh *target,
const XMLCh *value)
108 next_->piEvent(target, value);
113 next_->textEvent(value);
116 virtual void textEvent(
const XMLCh *chars,
unsigned int length)
118 next_->textEvent(chars, length);
123 next_->commentEvent(value);
126 virtual void attributeEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname,
const XMLCh *value,
127 const XMLCh *typeURI,
const XMLCh *typeName)
129 next_->attributeEvent(prefix, uri, localname, value, typeURI, typeName);
134 next_->namespaceEvent(prefix, uri);
138 const XMLCh *typeName)
140 next_->atomicItemEvent(type, value, typeURI, typeName);
154 return (in == 0 || *in == 0) ? 0 : in;