Merge lp:~zorba-coders/zorba/ns-nodes into lp:zorba

Proposed by Markos Zaharioudakis
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 11284
Merged at revision: 11536
Proposed branch: lp:~zorba-coders/zorba/ns-nodes
Merge into: lp:zorba
Diff against target: 72 lines (+24/-2)
3 files modified
src/runtime/core/constructors.cpp (+19/-1)
src/store/naive/node_items.cpp (+5/-0)
test/fots/CMakeLists.txt (+0/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/ns-nodes
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Review via email: mp+170942@code.launchpad.net

Commit message

Description of the change

To post a comment you must log in.
Revision history for this message
Markos Zaharioudakis (markos-za) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job ns-nodes-2013-06-22T11-07-02.352Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'src/runtime/core/constructors.cpp'
--- src/runtime/core/constructors.cpp 2013-06-20 09:52:25 +0000
+++ src/runtime/core/constructors.cpp 2013-06-22 11:03:28 +0000
@@ -316,6 +316,7 @@
316 zstring baseuri;316 zstring baseuri;
317 zstring pre;317 zstring pre;
318 zstring ns;318 zstring ns;
319 const store::NsBindings& localBindings = theLocalBindings->getLocalBindings();
319320
320 ElementIteratorState* state;321 ElementIteratorState* state;
321 DEFAULT_STACK_INIT(ElementIteratorState, state, planState);322 DEFAULT_STACK_INIT(ElementIteratorState, state, planState);
@@ -385,7 +386,7 @@
385 typeName,386 typeName,
386 true,387 true,
387 false,388 false,
388 theLocalBindings->getLocalBindings(),389 localBindings,
389 state->baseUri,390 state->baseUri,
390 false);391 false);
391 }392 }
@@ -443,6 +444,23 @@
443 break;444 break;
444 }445 }
445446
447 if (childKind == store::StoreConsts::namespaceNode)
448 {
449 csize numLocalBindings = localBindings.size();
450
451 for (csize i = 0; i < numLocalBindings; ++i)
452 {
453 const zstring& pre = localBindings[i].first;
454 const zstring& ns = localBindings[i].second;
455
456 if (pre == child->getNamespacePrefix() && ns != child->getNamespaceUri())
457 {
458 RAISE_ERROR(err::XQDY0102, loc,
459 ERROR_PARAMS(child->getNamespaceUri(), pre, ns));
460 }
461 }
462 }
463
446 if (child->getParent() != result.getp())464 if (child->getParent() != result.getp())
447 child->copy(result, copymode);465 child->copy(result, copymode);
448 }466 }
449467
=== modified file 'src/store/naive/node_items.cpp'
--- src/store/naive/node_items.cpp 2013-06-11 23:38:49 +0000
+++ src/store/naive/node_items.cpp 2013-06-22 11:03:28 +0000
@@ -3412,6 +3412,11 @@
3412 {3412 {
3413 if (!ns.empty())3413 if (!ns.empty())
3414 {3414 {
3415 if (prefix.empty() && theName->getNamespace().empty())
3416 {
3417 throw XQUERY_EXCEPTION(err::XQDY0102, ERROR_PARAMS(ns2, prefix, ns));
3418 }
3419
3415 addLocalBinding(prefix, ns);3420 addLocalBinding(prefix, ns);
3416 return;3421 return;
3417 }3422 }
34183423
=== modified file 'test/fots/CMakeLists.txt'
--- test/fots/CMakeLists.txt 2013-06-20 12:00:37 +0000
+++ test/fots/CMakeLists.txt 2013-06-22 11:03:28 +0000
@@ -230,7 +230,6 @@
230EXPECTED_FOTS_FAILURE (prod-CastExpr.schema CastAs-ListType-27 1110217)230EXPECTED_FOTS_FAILURE (prod-CastExpr.schema CastAs-ListType-27 1110217)
231EXPECTED_FOTS_FAILURE (prod-CastExpr.schema CastAs-ListType-31 1110217)231EXPECTED_FOTS_FAILURE (prod-CastExpr.schema CastAs-ListType-31 1110217)
232EXPECTED_FOTS_FAILURE (prod-CompDocConstructor K2-ConDocNode-2 1188302)232EXPECTED_FOTS_FAILURE (prod-CompDocConstructor K2-ConDocNode-2 1188302)
233EXPECTED_FOTS_FAILURE (prod-CompNamespaceConstructor nscons-042 1188285)
234EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-charref-2 1130998)233EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-charref-2 1130998)
235EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-007 1114221)234EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-007 1114221)
236EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-008 1114221)235EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-008 1114221)

Subscribers

People subscribed via source and target branches