arabica/include/XSLT/impl/xslt_call_template.hpp

38 lines
852 B
C++
Raw Normal View History

2007-07-19 19:01:42 +02:00
#ifndef ARABICA_XSLT_CALL_TEMPLATE_HPP
#define ARABICA_XSLT_CALL_TEMPLATE_HPP
#include "xslt_compiled_stylesheet.hpp"
2007-07-19 19:01:42 +02:00
#include "xslt_with_param.hpp"
namespace Arabica
{
namespace XSLT
{
2012-11-02 23:52:42 +01:00
template<class string_type, class string_adaptor>
2007-07-19 19:01:42 +02:00
class CallTemplate : public Item,
public WithParamable
{
public:
2012-11-02 23:52:42 +01:00
CallTemplate(const string_type& name) :
2007-07-19 19:01:42 +02:00
name_(name)
{
} // CallTemplate
2012-11-02 23:52:42 +01:00
virtual void execute(const DOM::Node<string_type, string_adaptor>& node,
ExecutionContext& context) const
2007-07-19 19:01:42 +02:00
{
ParamPasser passer(*this, node, context);
2007-07-19 19:01:42 +02:00
context.stylesheet().callTemplate(name_, node, context);
} // execute
private:
2012-11-02 23:52:42 +01:00
const string_type name_;
2007-07-19 19:01:42 +02:00
}; // class CallTemplate
} // namespace XSLT
} // namespace Arabica
#endif // ARABICA_XSLT_CALL_TEMPLATE_HPP