diff options
Diffstat (limited to 'src/dom/xpathparser.cpp')
| -rw-r--r-- | src/dom/xpathparser.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dom/xpathparser.cpp b/src/dom/xpathparser.cpp index 47a9a146a..cc6488eed 100644 --- a/src/dom/xpathparser.cpp +++ b/src/dom/xpathparser.cpp @@ -730,6 +730,8 @@ int XPathParser::getRelativeLocationPath(int p0, int depth) if (t.getType() == OPERATOR && t.getIntValue()==DOUBLE_SLASH)
{
p++;
+ // a '//' is an abbreviation for /descendant-or-self:node()/
+ tokAdd(new TokAxisDescendantOrSelf());
p2 = getRelativeLocationPath(p, depth+1);
if (p2 < 0)
{
@@ -2024,7 +2026,8 @@ NodeList XPathParser::evaluate(const Node *root, tokens.dump();
//### Execute the token list
- list = tokens.execute(root);
+ TokenExecutor executor;
+ list = executor.execute(tokens, root);
return list;
}
|
