20 #ifndef _EVENTHANDLER_HPP
21 #define _EVENTHANDLER_HPP
23 #include <xqilla/framework/XQillaExport.hpp>
27 #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) {
71 virtual void endEvent() = 0;
89 next_->setLocationInfo(location);
94 next_->startDocumentEvent(documentURI, encoding);
99 next_->endDocumentEvent();
104 next_->startElementEvent(prefix, uri, localname);
107 virtual void endElementEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname,
108 const XMLCh *typeURI,
const XMLCh *typeName)
110 next_->endElementEvent(prefix, uri, localname, typeURI, typeName);
113 virtual void piEvent(
const XMLCh *target,
const XMLCh *value)
115 next_->piEvent(target, value);
120 next_->textEvent(value);
123 virtual void textEvent(
const XMLCh *chars,
unsigned int length)
125 next_->textEvent(chars, length);
130 next_->commentEvent(value);
133 virtual void attributeEvent(
const XMLCh *prefix,
const XMLCh *uri,
const XMLCh *localname,
const XMLCh *value,
134 const XMLCh *typeURI,
const XMLCh *typeName)
136 next_->attributeEvent(prefix, uri, localname, value, typeURI, typeName);
141 next_->namespaceEvent(prefix, uri);
145 const XMLCh *typeName)
147 next_->atomicItemEvent(type, value, typeURI, typeName);
161 return (in == 0 || *in == 0) ? 0 : in;