diff --git a/include/XPath/impl/xpath_step.hpp b/include/XPath/impl/xpath_step.hpp index cbefcec9..5550e0e9 100644 --- a/include/XPath/impl/xpath_step.hpp +++ b/include/XPath/impl/xpath_step.hpp @@ -489,6 +489,15 @@ public: const ExecutionContext& executionContext) const { NodeSet ns; + + NodeSet nodes = expr_->evaluate(context, executionContext).asNodeSet(); + for(typename NodeSet::const_iterator n = nodes.begin(), ne = nodes.end(); n != ne; ++n) + if(context == *n) + { + ns.push_back(context); + break; + } // if ... + return XPathValue(new NodeSetValue(ns)); } // evaluate diff --git a/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml b/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml index fffeca5e..11dc8863 100644 --- a/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml +++ b/tests/XSLT/testsuite/TESTS/arabica-expected-fails.xml @@ -399,7 +399,10 @@ + + +