2007-07-19 19:01:42 +02:00
|
|
|
#ifndef ARABICA_XSLT_MESSAGE_HANDLER_HPP
|
|
|
|
#define ARABICA_XSLT_MESSAGE_HANDLER_HPP
|
|
|
|
|
|
|
|
#include "../xslt_message.hpp"
|
|
|
|
#include "xslt_item_container_handler.hpp"
|
|
|
|
|
|
|
|
namespace Arabica
|
|
|
|
{
|
|
|
|
namespace XSLT
|
|
|
|
{
|
|
|
|
|
|
|
|
class MessageHandler : public ItemContainerHandler<Message>
|
|
|
|
{
|
|
|
|
public:
|
2012-11-02 22:01:15 +01:00
|
|
|
MessageHandler(CompilationContext<std::string>& context) :
|
2007-07-19 19:01:42 +02:00
|
|
|
ItemContainerHandler<Message>(context)
|
|
|
|
{
|
|
|
|
} // MessageHandler
|
|
|
|
|
|
|
|
protected:
|
2010-01-10 23:02:43 +01:00
|
|
|
virtual Message* createContainer(const std::string& /* namespaceURI */,
|
|
|
|
const std::string& /* localName */,
|
2007-07-19 19:01:42 +02:00
|
|
|
const std::string& qName,
|
2007-09-05 14:57:07 +02:00
|
|
|
const SAX::Attributes<std::string>& atts)
|
2007-07-19 19:01:42 +02:00
|
|
|
{
|
|
|
|
static const ValueRule rules[] = { { "terminate", false, No, AllowedYesNo },
|
2010-01-10 23:02:43 +01:00
|
|
|
{ 0, false, 0, 0 } };
|
2007-07-19 19:01:42 +02:00
|
|
|
return new Message(gatherAttributes(qName, atts, rules)["terminate"] == Yes);
|
|
|
|
} // createContainer
|
|
|
|
}; // class MessageHandler
|
|
|
|
|
|
|
|
} // namespace XSLT
|
|
|
|
} // namespace Arabica
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|