From c436c32e6c544cd1cdbf16ddf407fff382a4ade7 Mon Sep 17 00:00:00 2001 From: "arseny.kapoulkine" Date: Sat, 29 May 2010 22:52:40 +0000 Subject: Fixed descendant-or-self axis for attributes git-svn-id: http://pugixml.googlecode.com/svn/trunk@468 99668b35-9821-0410-8761-19e4c4f06640 --- src/pugixpath.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/pugixpath.cpp b/src/pugixpath.cpp index 94498bc..493b6e5 100644 --- a/src/pugixpath.cpp +++ b/src/pugixpath.cpp @@ -1751,6 +1751,15 @@ namespace pugi break; } + case axis_descendant_or_self: + { + ns.m_type = ns.empty() ? xpath_node_set::type_sorted : xpath_node_set::type_unsorted; + + step_push(ns, a, p); + + break; + } + case axis_following: { ns.m_type = ns.empty() ? xpath_node_set::type_sorted : xpath_node_set::type_unsorted; @@ -1858,6 +1867,7 @@ namespace pugi case axis_ancestor: case axis_ancestor_or_self: + case axis_descendant_or_self: case axis_following: case axis_preceding: if (m_left) @@ -1891,7 +1901,6 @@ namespace pugi case axis_attribute: case axis_child: case axis_descendant: - case axis_descendant_or_self: if (m_left) { xpath_node_set s = m_left->eval_node_set(c); -- cgit v1.2.3