diff --git a/include/XPath/impl/xpath_function.hpp b/include/XPath/impl/xpath_function.hpp index f15b0877..1c890793 100644 --- a/include/XPath/impl/xpath_function.hpp +++ b/include/XPath/impl/xpath_function.hpp @@ -136,6 +136,26 @@ protected: const ExecutionContext& executionContext) const = 0; }; // class StringXPathFunction +template > +class NodeSetXPathFunction : public XPathFunction +{ +public: + NodeSetXPathFunction(int minArgs, int maxArgs, const std::vector >& args) : + XPathFunction(minArgs, maxArgs, args) { } + + virtual ValueType type() const { return NODE_SET; } + + virtual XPathValue_impl* evaluate(const DOM::Node& context, + const ExecutionContext& executionContext) const + { + return new NodeSetValue(doEvaluate(context, executionContext)); + } // evaluate + +protected: + virtual NodeSet doEvaluate(const DOM::Node& context, + const ExecutionContext& executionContext) const = 0; +}; // class NodeSetXPathFunction + namespace impl {