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;
Definition: EventHandler.hpp:67
virtual void startElementEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname)
Handles the start of an element node as an event.
Definition: EventHandler.hpp:95
EventFilter(EventHandler *next)
Definition: EventHandler.hpp:70
Definition: EventHandler.hpp:29
virtual ~EventHandler()
Definition: EventHandler.hpp:32
virtual void endDocumentEvent()
Handles a document node as an event.
Definition: EventHandler.hpp:90
virtual void textEvent(const XMLCh *chars, unsigned int length)
Handles a text node as an event.
Definition: EventHandler.hpp:116
AtomicObjectType
Definition: AnyAtomicType.hpp:34
static const XMLCh * emptyToNull(const XMLCh *const in)
Definition: EventHandler.hpp:152
virtual void namespaceEvent(const XMLCh *prefix, const XMLCh *uri)
Handles a namespace binding as an event.
Definition: EventHandler.hpp:132
virtual void setLocationInfo(const LocationInfo *location)
Recieves a LocationInfo object that is owned by the caller, and will be updated with the current loca...
Definition: EventHandler.hpp:80
virtual void startDocumentEvent(const XMLCh *documentURI, const XMLCh *encoding)
Handles a document node as an event.
Definition: EventHandler.hpp:85
virtual void atomicItemEvent(AnyAtomicType::AtomicObjectType type, const XMLCh *value, const XMLCh *typeURI, const XMLCh *typeName)
Handles an atomic item as an event.
Definition: EventHandler.hpp:61
virtual void attributeEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname, const XMLCh *value, const XMLCh *typeURI, const XMLCh *typeName)
Handles an attribute node as an event.
Definition: EventHandler.hpp:126
virtual void setLocationInfo(const LocationInfo *location)
Recieves a LocationInfo object that is owned by the caller, and will be updated with the current loca...
Definition: EventHandler.hpp:36
virtual void endEvent()
Called when all events have been reported.
Definition: EventHandler.hpp:143
EventHandler * next_
Definition: EventHandler.hpp:149
virtual void endElementEvent(const XMLCh *prefix, const XMLCh *uri, const XMLCh *localname, const XMLCh *typeURI, const XMLCh *typeName)
Handles the end of an element node as an event.
Definition: EventHandler.hpp:100
virtual void piEvent(const XMLCh *target, const XMLCh *value)
Handles a processing instruction node as an event.
Definition: EventHandler.hpp:106
A class that gives records a location in the query.
Definition: LocationInfo.hpp:29
virtual void commentEvent(const XMLCh *value)
Handles a comment node as an event.
Definition: EventHandler.hpp:121
virtual void atomicItemEvent(AnyAtomicType::AtomicObjectType type, const XMLCh *value, const XMLCh *typeURI, const XMLCh *typeName)
Handles an atomic item as an event.
Definition: EventHandler.hpp:137
virtual void textEvent(const XMLCh *value)
Handles a text node as an event.
Definition: EventHandler.hpp:111
void setNextEventHandler(EventHandler *next)
Definition: EventHandler.hpp:75