Merge lp:~zorba-coders/zorba/bug-1073978 into lp:zorba

Proposed by Matthias Brantner
Status: Merged
Approved by: Sorin Marian Nasoi
Approved revision: 11140
Merged at revision: 11141
Proposed branch: lp:~zorba-coders/zorba/bug-1073978
Merge into: lp:zorba
Diff against target: 72 lines (+25/-3)
4 files modified
ChangeLog (+1/-0)
src/compiler/translator/translator.cpp (+19/-3)
src/context/static_context.cpp (+4/-0)
src/context/static_context.h (+1/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1073978
Reviewer Review Type Date Requested Status
Sorin Marian Nasoi Approve
Matthias Brantner Approve
Review via email: mp+138355@code.launchpad.net

Commit message

fix for bug #1073978 (FOTS: option default ns not supported)

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

The attempt to merge lp:~zorba-coders/zorba/bug-1073978 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job bug-1073978-2012-12-06T01-19-40.619Z is finished. The
  final status was:

  2 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

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 bug-1073978-2012-12-07T05-35-48.353Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Pending.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) :
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 bug-1073978-2012-12-11T18-59-49.133Z 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
1=== modified file 'ChangeLog'
2--- ChangeLog 2012-12-06 23:26:15 +0000
3+++ ChangeLog 2012-12-07 05:36:51 +0000
4@@ -25,6 +25,7 @@
5 #1079488 (streaming segfault)
6 * Fixed bug #1062093 (bug in var reference iterators with an associated
7 position that is negative)
8+ * Fixed bug #1073978 (FOTS: option default ns not supported)
9 * Fixed bug #1061222 (bad message for errors in index key type declaration)
10 * Fixed bug #1065175 (preceding::node()[1] returns wrong results)
11 * Fixed bug #1065321 (following:text() doesn't return results in doc order)
12
13=== modified file 'src/compiler/translator/translator.cpp'
14--- src/compiler/translator/translator.cpp 2012-11-20 18:17:10 +0000
15+++ src/compiler/translator/translator.cpp 2012-12-07 05:36:51 +0000
16@@ -3329,10 +3329,26 @@
17 store::Item_t qnameItem;
18 zstring value = opt_decl->get_val().str();
19
20- expand_no_default_qname(qnameItem, opt_decl->get_qname(), loc);
21+ rchandle<QName> lQName = opt_decl->get_qname();
22+ if (theSctx->xquery_version() >= StaticContextConsts::xquery_version_3_0 &&
23+ lQName->get_namespace().empty() && lQName->get_prefix().empty())
24+ {
25+ theSctx->expand_qname(
26+ qnameItem,
27+ static_context::XQUERY_OPTION_NS,
28+ "",
29+ lQName->get_localname(),
30+ lQName->get_location());
31+ }
32+ else
33+ {
34+ expand_no_default_qname(qnameItem, lQName, loc);
35+ if (qnameItem->getPrefix().empty() && qnameItem->getNamespace().empty())
36+ {
37+ RAISE_ERROR(err::XPST0081, loc, ERROR_PARAMS(qnameItem->getStringValue()));
38+ }
39+ }
40
41- if (qnameItem->getPrefix().empty() && qnameItem->getNamespace().empty())
42- RAISE_ERROR(err::XPST0081, loc, ERROR_PARAMS(qnameItem->getStringValue()));
43
44 if (qnameItem->getNamespace() == static_context::ZORBA_OPTION_FEATURE_NS &&
45 value == "http-uri-resolution")
46
47=== modified file 'src/context/static_context.cpp'
48--- src/context/static_context.cpp 2012-12-02 07:25:04 +0000
49+++ src/context/static_context.cpp 2012-12-07 05:36:51 +0000
50@@ -495,6 +495,10 @@
51 "http://www.zorba-xquery.com/options/optimizer";
52
53 const char*
54+static_context::XQUERY_OPTION_NS =
55+"http://www.w3.org/2011/xquery-options";
56+
57+const char*
58 static_context::ZORBA_VERSIONING_NS =
59 "http://www.zorba-xquery.com/options/versioning";
60
61
62=== modified file 'src/context/static_context.h'
63--- src/context/static_context.h 2012-11-12 17:12:41 +0000
64+++ src/context/static_context.h 2012-12-07 05:36:51 +0000
65@@ -562,6 +562,7 @@
66 static const char* ZORBA_OPTION_WARN_NS;
67 static const char* ZORBA_OPTION_FEATURE_NS;
68 static const char* ZORBA_OPTION_OPTIM_NS;
69+ static const char* XQUERY_OPTION_NS;
70 static const char* ZORBA_VERSIONING_NS;
71
72 protected:

Subscribers

People subscribed via source and target branches