2007-07-19 19:01:42 +02:00
|
|
|
#ifndef ARABICA_XSLT_CALL_TEMPLATE_HPP
|
|
|
|
#define ARABICA_XSLT_CALL_TEMPLATE_HPP
|
|
|
|
|
2008-11-05 02:33:28 +01:00
|
|
|
#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>
|
2012-11-08 17:18:49 +01:00
|
|
|
class CallTemplate : public Item<string_type, string_adaptor>,
|
2012-11-06 09:11:27 +01:00
|
|
|
public WithParamable<string_type, string_adaptor>
|
2007-07-19 19:01:42 +02:00
|
|
|
{
|
|
|
|
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,
|
2012-11-08 18:13:33 +01:00
|
|
|
ExecutionContext<string_type, string_adaptor>& context) const
|
2007-07-19 19:01:42 +02:00
|
|
|
{
|
2012-11-06 09:11:27 +01:00
|
|
|
ParamPasser<string_type, string_adaptor> 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
|
|
|
|
|