arabica/include/XSLT/impl/xslt_call_template.hpp

38 lines
968 B
C++
Raw Normal View History

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