#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 { template class MessageHandler : public ItemContainerHandler > { typedef ItemContainerHandler > baseT; typedef StylesheetConstant SC; typedef AttributeValidators AV; public: MessageHandler(CompilationContext& context) : baseT(context) { } // MessageHandler protected: virtual Message* createContainer(const string_type& /* namespaceURI */, const string_type& /* localName */, const string_type& qName, const SAX::Attributes& atts) { static const AV rules = AV::rule(SC::terminate, false, SC::no, AllowedValues(SC::yes, SC::no)); return new Message(rules.gather(qName, atts)[SC::terminate] == SC::yes); } // createContainer }; // class MessageHandler } // namespace XSLT } // namespace Arabica #endif