2007-07-19 19:01:42 +02:00
|
|
|
#ifndef ARABICA_XSLT_TOP_LEVEL_PARAM_HPP
|
|
|
|
#define ARABICA_XSLT_TOP_LEVEL_PARAM_HPP
|
|
|
|
|
|
|
|
namespace Arabica
|
|
|
|
{
|
|
|
|
namespace XSLT
|
|
|
|
{
|
|
|
|
|
|
|
|
class TopLevelParam : public Variable_declaration
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
TopLevelParam(const std::string& namespace_uri,
|
|
|
|
const std::string& name,
|
2009-02-18 09:37:16 +01:00
|
|
|
Arabica::XPath::XPathValue<std::string> value) :
|
2007-07-19 19:01:42 +02:00
|
|
|
namespace_uri_(namespace_uri),
|
|
|
|
name_(name),
|
|
|
|
value_(value)
|
|
|
|
{
|
|
|
|
} // TopLevelParam
|
|
|
|
|
|
|
|
virtual ~TopLevelParam() { }
|
|
|
|
|
|
|
|
virtual void declare(ExecutionContext& context) const
|
|
|
|
{
|
|
|
|
context.topLevelParam(null_node, *this);
|
|
|
|
} // declare
|
|
|
|
|
|
|
|
virtual const std::string& namespace_uri() const { return namespace_uri_; }
|
|
|
|
virtual const std::string& name() const { return name_; }
|
2007-10-22 19:42:50 +02:00
|
|
|
virtual Arabica::XPath::XPathValue<std::string> value(const DOM::Node<std::string>& node,
|
|
|
|
ExecutionContext& context,
|
|
|
|
DOMSink& sink) const
|
2007-07-19 19:01:42 +02:00
|
|
|
{
|
|
|
|
return value_;
|
|
|
|
} // value
|
2008-11-19 18:26:07 +01:00
|
|
|
virtual const Precedence& precedence() const { return Precedence::InitialPrecedence(); }
|
2007-07-19 19:01:42 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
static DOM::Node<std::string> null_node;
|
|
|
|
std::string namespace_uri_;
|
|
|
|
std::string name_;
|
2009-02-18 09:37:16 +01:00
|
|
|
Arabica::XPath::XPathValue<std::string> value_;
|
2007-07-19 19:01:42 +02:00
|
|
|
}; // class TopLevelParam
|
|
|
|
|
|
|
|
DOM::Node<std::string> TopLevelParam::null_node;
|
|
|
|
|
|
|
|
} // namespace XSLT
|
|
|
|
} // namespace Arabica
|
|
|
|
#endif
|
|
|
|
|