zorba-coders team mailing list archive
-
zorba-coders team
-
Mailing list archive
-
Message #15362
[Merge] lp:~zorba-coders/zorba/markos-scratch into lp:zorba
Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch into lp:zorba.
Commit message:
Fixed bug #1065321 (following:text() doesn't return results in doc order)
Requested reviews:
Markos Zaharioudakis (markos-za)
For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/129517
Fixed bug #1065321 (following:text() doesn't return results in doc order)
--
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/129517
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'src/runtime/core/path_iterators.cpp'
--- src/runtime/core/path_iterators.cpp 2012-10-12 10:46:46 +0000
+++ src/runtime/core/path_iterators.cpp 2012-10-12 21:09:20 +0000
@@ -1875,6 +1875,8 @@
ancestor = ancestor->getParent();
}
+ std::reverse(state->theAncestorPath.begin(), state->theAncestorPath.end());
+
// For each ancestor A of the current context node N and for each child C
// of A such as C is to the right of the next ancestor AC in the ancestor
// path (note: AC is a child of A), traverse the subtree rooted at C.
@@ -1886,7 +1888,7 @@
ancestor = state->theAncestorPath.back();
state->theAncestorPath.pop_back();
- state->theAncestorChildren->init(ancestor, state->theAncestorPath.back());
+ state->theAncestorChildren->init(state->theAncestorPath.back().getp(), ancestor);
state->theAncestorChildren->open();
// For each child C of A such that C is to the right of AC ...
=== added file 'test/rbkt/ExpQueryResults/zorba/paths/following_01.xml.res'
--- test/rbkt/ExpQueryResults/zorba/paths/following_01.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/paths/following_01.xml.res 2012-10-12 21:09:20 +0000
@@ -0,0 +1,1 @@
+Y Z
=== added file 'test/rbkt/Queries/zorba/paths/following_01.xq'
--- test/rbkt/Queries/zorba/paths/following_01.xq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/paths/following_01.xq 2012-10-12 21:09:20 +0000
@@ -0,0 +1,2 @@
+
+(<a><b>X<e>Y</e></b>Z</a>//text())[1]/following::text()
Follow ups