mirror of
https://github.com/jezhiggins/arabica
synced 2024-12-29 22:23:27 +01:00
f610d739fe
Templates are now constructed with their precedence. Variables are too, with a tweak to allow for the immediate evaluation of non-topl-level params and vars. The execution context now no longer needs to track variable precedence, which is good because it will be getting it wrong anyway. Corresponding simplifications follow to compliation context.
33 lines
745 B
C++
33 lines
745 B
C++
#ifndef ARABICA_XSLT_VARIABLE_HPP
|
|
#define ARABICA_XSLT_VARIABLE_HPP
|
|
|
|
#include "xslt_variable_impl.hpp"
|
|
|
|
namespace Arabica
|
|
{
|
|
namespace XSLT
|
|
{
|
|
|
|
class Variable : public Variable_impl
|
|
{
|
|
public:
|
|
Variable(const std::string& namespace_uri,
|
|
const std::string& name,
|
|
Arabica::XPath::XPathExpressionPtr<std::string> select,
|
|
const Precedence precedence) :
|
|
Variable_impl(namespace_uri, name, select, precedence)
|
|
{
|
|
} // Variable
|
|
|
|
virtual ~Variable() { }
|
|
|
|
virtual void execute(const DOM::Node<std::string>& node, ExecutionContext& context) const
|
|
{
|
|
context.declareVariable(node, *this);
|
|
} // declare
|
|
}; // Variable
|
|
|
|
} // namespace XSLT
|
|
} // namespace Arabica
|
|
#endif
|
|
|