mirror of
https://github.com/jezhiggins/arabica
synced 2024-12-30 22:23:40 +01:00
39 lines
743 B
C++
39 lines
743 B
C++
#ifndef ARABICA_XSLT_MESSAGE_HPP
|
|
#define ARABICA_XSLT_MESSAGE_HPP
|
|
|
|
#include "xslt_item.hpp"
|
|
|
|
namespace Arabica
|
|
{
|
|
namespace XSLT
|
|
{
|
|
|
|
class Message : public ItemContainer
|
|
{
|
|
public:
|
|
Message(bool terminate) :
|
|
terminate_(terminate)
|
|
{
|
|
} // Message
|
|
|
|
virtual ~Message() { }
|
|
|
|
virtual void execute(const DOM::Node<std::string>& node, ExecutionContext& context) const
|
|
{
|
|
context.redirectToMessageSink(true);
|
|
execute_children(node, context);
|
|
context.redirectToMessageSink(false);
|
|
|
|
if(terminate_)
|
|
throw SAX::SAXException("Stylesheet terminated by xsl:message");
|
|
} // execute
|
|
|
|
private:
|
|
bool terminate_;
|
|
}; // class Message
|
|
|
|
} // namespace XSLT
|
|
} // namespace Arabica
|
|
|
|
#endif
|
|
|