22 #ifndef _EVENTHANDLER_HPP
23 #define _EVENTHANDLER_HPP
25 #include <xqilla/framework/XQillaExport.hpp>
29 #include <xercesc/util/XercesDefs.hpp>
41 virtual void startDocumentEvent(
const XMLCh *documentURI,
const XMLCh *encoding) = 0;
43 virtual void endDocumentEvent() = 0;
45 virtual void startElementEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname) = 0;
47 virtual void endElementEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname,
48 const XMLCh *typeURI,
const XMLCh *typeName) = 0;
50 virtual void piEvent(
const XMLCh *target,
const XMLCh *value) = 0;
52 virtual void textEvent(
const XMLCh *value) = 0;
54 virtual void textEvent(
const XMLCh *chars,
unsigned int length) = 0;
56 virtual void commentEvent(
const XMLCh *value) = 0;
58 virtual void attributeEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname,
const XMLCh *value,
59 const XMLCh *typeURI,
const XMLCh *typeName) = 0;
61 virtual void namespaceEvent(
const XMLCh *prefix,
const XMLCh *uri) = 0;
64 const XMLCh *typeURI,
const XMLCh *typeName) {}
66 virtual void endEvent() = 0;
84 next_->setLocationInfo(location);
89 next_->startDocumentEvent(documentURI, encoding);
94 next_->endDocumentEvent();
97 virtual void startElementEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname)
99 next_->startElementEvent(prefix, uri, localname);
102 virtual void endElementEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname,
103 const XMLCh *typeURI,
const XMLCh *typeName)
105 next_->endElementEvent(prefix, uri, localname, typeURI, typeName);
108 virtual void piEvent(
const XMLCh *target,
const XMLCh *value)
110 next_->piEvent(target, value);
115 next_->textEvent(value);
118 virtual void textEvent(
const XMLCh *chars,
unsigned int length)
120 next_->textEvent(chars, length);
125 next_->commentEvent(value);
128 virtual void attributeEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname,
const XMLCh *value,
129 const XMLCh *typeURI,
const XMLCh *typeName)
131 next_->attributeEvent(prefix, uri, localname, value, typeURI, typeName);
136 next_->namespaceEvent(prefix, uri);
140 const XMLCh *typeName)
142 next_->atomicItemEvent(type, value, typeURI, typeName);
156 return (in == 0 || *in == 0) ? 0 : in;