← Back to team overview

zorba-coders team mailing list archive

[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 #1065175 (preceding::node()[1] returns wrong results)

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/129385

Fixed bug #1065175 (preceding::node()[1] returns wrong results)
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/129385
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-10-09 16:41:44 +0000
+++ ChangeLog	2012-10-12 10:48:35 +0000
@@ -11,7 +11,8 @@
   * Fixed mustCopyInputNodes() method of no-copy, and jsoniq functions.
   * Fixed bug #1062093 (bug in var reference iterators with an associated
     position that is negative)
-  * Fixed bug #1061222 (bad message for errors in index key type declaration) 
+  * Fixed bug #1061222 (bad message for errors in index key type declaration)
+  * Fixed bug #1065175 (preceding::node()[1] returns wrong results)
   * Fixed bug #1021492 (while computeing the "sources" of a prolog var, skip
     any var-setting exprs that appear in non-used (and non-optimized) functions). 
 

=== modified file 'src/runtime/core/path_iterators.cpp'
--- src/runtime/core/path_iterators.cpp	2012-09-19 21:16:15 +0000
+++ src/runtime/core/path_iterators.cpp	2012-10-12 10:48:35 +0000
@@ -1788,7 +1788,7 @@
           // We have traversed all the subtrees of the node D that is at the
           // top of theCurrentPath. Return D to the caller, if it satifies the
           // node test, and then pop D from theCurrentPath.
-          if (nameOrKindTest(theSctx, state->topNode(), loc))
+          if (!getNextContextNode && nameOrKindTest(theSctx, state->topNode(), loc))
           {
             result = state->topNode();
             STACK_PUSH(true, state);

=== added file 'test/rbkt/ExpQueryResults/zorba/paths/preceding_pred_01.xml.res'
--- test/rbkt/ExpQueryResults/zorba/paths/preceding_pred_01.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/paths/preceding_pred_01.xml.res	2012-10-12 10:48:35 +0000
@@ -0,0 +1,1 @@
+B

=== added file 'test/rbkt/Queries/zorba/paths/preceding_pred_01.xq'
--- test/rbkt/Queries/zorba/paths/preceding_pred_01.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/paths/preceding_pred_01.xq	2012-10-12 10:48:35 +0000
@@ -0,0 +1,4 @@
+
+<a><b>B</b><c/></a>/c/preceding::node()[1]
+
+


Follow ups