Merge lp:~nbrinza/zorba/bugs3 into lp:zorba

Proposed by Nicolae Brinza
Status: Merged
Approved by: Chris Hillery
Approved revision: 11333
Merged at revision: 11337
Proposed branch: lp:~nbrinza/zorba/bugs3
Merge into: lp:zorba
Diff against target: 187 lines (+43/-3)
11 files modified
ChangeLog (+1/-0)
include/zorba/pregenerated/diagnostic_list.h (+2/-0)
modules/w3c/pregenerated/xqt-errors.xq (+8/-0)
src/compiler/translator/translator.cpp (+9/-1)
src/context/static_context.cpp (+4/-0)
src/context/static_context.h (+2/-1)
src/diagnostics/diagnostic_en.xml (+11/-0)
src/diagnostics/pregenerated/diagnostic_list.cpp (+3/-0)
src/diagnostics/pregenerated/dict_en.cpp (+2/-0)
src/diagnostics/pregenerated/dict_zed_keys.h (+1/-0)
test/fots/CMakeLists.txt (+0/-1)
To merge this branch: bzr merge lp:~nbrinza/zorba/bugs3
Reviewer Review Type Date Requested Status
Chris Hillery Approve
Nicolae Brinza Approve
Review via email: mp+156734@code.launchpad.net

This proposal supersedes a proposal from 2013-04-02.

Commit message

Unrecognized options in the XQuery namespace now raise an error, fixes K-OptionDeclarationProlog-1b

Description of the change

Unrecognized options in the XQuery namespace now raise an error, fixes K-OptionDeclarationProlog-1b

To post a comment you must log in.
Revision history for this message
Nicolae Brinza (nbrinza) : Posted in a previous version of this proposal
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote : Posted in a previous version of this proposal

The attempt to merge lp:~nbrinza/zorba/bugs3 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 bugs3-2013-04-02T22-04-43.127Z is finished. The final
  status was:

  13 tests did not succeed - changes not commited.

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

Revision history for this message
Nicolae Brinza (nbrinza) :
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 bugs3-2013-04-03T04-03-48.436Z 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, Needs Information < 1, Resubmit < 1. Got: 1 Approve, 1 Pending.

Revision history for this message
Chris Hillery (ceejatec) :
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 bugs3-2013-04-03T07-08-55.435Z 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 2013-04-01 02:48:23 +0000
3+++ ChangeLog 2013-04-03 04:02:29 +0000
4@@ -36,6 +36,7 @@
5 * Extented index join rule to general flwor expressions.
6
7 Bug Fixes/Other Changes:
8+ * Fixed bug #1114228 (unrecognized options in the XQuery namespace now raise an error)
9 * Fixed bug #1124273 (xqdoc crash because of annotation literals)
10 * Fixed bug #867027 (XQST0059 error messages inconsistent)
11 * Fixed bug #1095889 (Improve error message for xml-parsing error).
12
13=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
14--- include/zorba/pregenerated/diagnostic_list.h 2013-03-28 05:32:59 +0000
15+++ include/zorba/pregenerated/diagnostic_list.h 2013-04-03 04:02:29 +0000
16@@ -158,6 +158,8 @@
17
18 extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0111;
19
20+extern ZORBA_DLL_PUBLIC XQueryErrorCode XQST0123;
21+
22 extern ZORBA_DLL_PUBLIC XQueryErrorCode XPDY0002;
23
24 extern ZORBA_DLL_PUBLIC XQueryErrorCode XPDY0050;
25
26=== modified file 'modules/w3c/pregenerated/xqt-errors.xq'
27--- modules/w3c/pregenerated/xqt-errors.xq 2013-03-28 05:32:59 +0000
28+++ modules/w3c/pregenerated/xqt-errors.xq 2013-04-03 04:02:29 +0000
29@@ -674,6 +674,14 @@
30
31 (:~
32 :
33+ : It is a static error if the name of a feature in require-feature is not recognized by the implementation.
34+ :
35+ : @see http://www.w3.org/2005/xqt-errors
36+:)
37+declare variable $err:XQST0123 as xs:QName := fn:QName($err:NS, "err:XQST0123");
38+
39+(:~
40+ :
41 : It is a dynamic error if evaluation of an expression relies on some part
42 : of the dynamic context that has not been assigned a value.
43 :
44
45=== modified file 'src/compiler/translator/translator.cpp'
46--- src/compiler/translator/translator.cpp 2013-03-27 12:40:41 +0000
47+++ src/compiler/translator/translator.cpp 2013-04-03 04:02:29 +0000
48@@ -3525,7 +3525,7 @@
49 {
50 theSctx->expand_qname(
51 qnameItem,
52- static_context::XQUERY_OPTION_NS,
53+ static_context::XQUERY_NS,
54 "",
55 lQName->get_localname(),
56 lQName->get_location());
57@@ -3539,6 +3539,14 @@
58 }
59 }
60
61+ if (qnameItem->getNamespace() == static_context::XQUERY_NS
62+ &&
63+ qnameItem->getLocalName() != "require-feature"
64+ &&
65+ qnameItem->getLocalName() != "prohibit-feature")
66+ {
67+ RAISE_ERROR(err::XQST0123, loc, ERROR_PARAMS(ZED(UnrecognizedXQueryOption), qnameItem->getLocalName()));
68+ }
69
70 if (qnameItem->getNamespace() == static_context::ZORBA_OPTION_FEATURE_NS &&
71 value == "http-uri-resolution")
72
73=== modified file 'src/context/static_context.cpp'
74--- src/context/static_context.cpp 2013-03-22 00:49:51 +0000
75+++ src/context/static_context.cpp 2013-04-03 04:02:29 +0000
76@@ -512,6 +512,10 @@
77 "http://www.zorba-xquery.com/options/optimizer";
78
79 const char*
80+static_context::XQUERY_NS =
81+"http://www.w3.org/2012/xquery";
82+
83+const char*
84 static_context::XQUERY_OPTION_NS =
85 "http://www.w3.org/2011/xquery-options";
86
87
88=== modified file 'src/context/static_context.h'
89--- src/context/static_context.h 2013-03-22 00:49:51 +0000
90+++ src/context/static_context.h 2013-04-03 04:02:29 +0000
91@@ -567,7 +567,8 @@
92 static const char* ZORBA_OPTION_WARN_NS;
93 static const char* ZORBA_OPTION_FEATURE_NS;
94 static const char* ZORBA_OPTION_OPTIM_NS;
95- static const char* XQUERY_OPTION_NS;
96+ static const char* XQUERY_NS; // http://www.w3.org/2012/xquery
97+ static const char* XQUERY_OPTION_NS; // http://www.w3.org/2011/xquery-options
98 static const char* ZORBA_VERSIONING_NS;
99
100 protected:
101
102=== modified file 'src/diagnostics/diagnostic_en.xml'
103--- src/diagnostics/diagnostic_en.xml 2013-04-01 02:22:49 +0000
104+++ src/diagnostics/diagnostic_en.xml 2013-04-03 04:02:29 +0000
105@@ -814,6 +814,13 @@
106 <value>$1</value>
107 </diagnostic>
108
109+ <diagnostic code="XQST0123">
110+ <comment>
111+ It is a static error if the name of a feature in require-feature is not recognized by the implementation.
112+ </comment>
113+ <value>$1</value>
114+ </diagnostic>
115+
116 <diagnostic code="XPDY0002">
117 <comment>
118 It is a dynamic error if evaluation of an expression relies on some part
119@@ -5007,6 +5014,10 @@
120 <value>"$5": duplicate attribute enumeration value token</value>
121 </entry>
122
123+ <entry key="UnrecognizedXQueryOption">
124+ <value>"$2": unrecognized XQuery namespace option</value>
125+ </entry>
126+
127 </subvalues>
128
129 </diagnostic-list>
130
131=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
132--- src/diagnostics/pregenerated/diagnostic_list.cpp 2013-03-28 05:32:59 +0000
133+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2013-04-03 04:02:29 +0000
134@@ -220,6 +220,9 @@
135 XQueryErrorCode XQST0111( "XQST0111" );
136
137
138+XQueryErrorCode XQST0123( "XQST0123" );
139+
140+
141 XQueryErrorCode XPDY0002( "XPDY0002" );
142
143
144
145=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
146--- src/diagnostics/pregenerated/dict_en.cpp 2013-04-01 02:22:49 +0000
147+++ src/diagnostics/pregenerated/dict_en.cpp 2013-04-03 04:02:29 +0000
148@@ -260,6 +260,7 @@
149 { "XQST0103", "$1: non-distinct variable in window clause" },
150 { "XQST0106", "$1: multiple annotations with $2 names" },
151 { "XQST0111", "$1" },
152+ { "XQST0123", "$1" },
153 { "XQTY0024", "element constructor content sequence must not have an attribute node following a non-attribute node" },
154 { "XQTY0030", "validate argument must be exactly one document or element node" },
155 { "XQTY0086", "typed value of copied element or attribute node is namespace-sensitive when construction mode is preserve and copy-namespaces mode is no-preserve" },
156@@ -925,6 +926,7 @@
157 { "~UnescapedChar_3", "character '$3' must be escaped here" },
158 #endif
159 { "~UnexpectedElement", "unexpected element" },
160+ { "~UnrecognizedXQueryOption", "\"$2\": unrecognized XQuery namespace option" },
161 { "~VarValMustBeSingleItem_2", "\"$2\": variable value must be single item" },
162 { "~XMLParserInitFailed", "XML parser initialization failed" },
163 { "~XMLParserNoCreateTree", "XML tree creation failed" },
164
165=== modified file 'src/diagnostics/pregenerated/dict_zed_keys.h'
166--- src/diagnostics/pregenerated/dict_zed_keys.h 2013-04-01 02:22:49 +0000
167+++ src/diagnostics/pregenerated/dict_zed_keys.h 2013-04-03 04:02:29 +0000
168@@ -515,6 +515,7 @@
169 #define ZED_libxml_ERR_539 "~libxml_ERR_539"
170 #define ZED_libxml_ERR_540 "~libxml_ERR_540"
171 #define ZED_libxml_ERR_541 "~libxml_ERR_541"
172+#define ZED_UnrecognizedXQueryOption "~UnrecognizedXQueryOption"
173
174 #endif /* ZORBA_DIAGNOSTICS_ZED_KEYS */
175 /*
176
177=== modified file 'test/fots/CMakeLists.txt'
178--- test/fots/CMakeLists.txt 2013-04-02 18:29:15 +0000
179+++ test/fots/CMakeLists.txt 2013-04-03 04:02:29 +0000
180@@ -474,7 +474,6 @@
181 EXPECTED_FOTS_FAILURE (prod-ModuleImport modules-pub-priv-30 0)
182 EXPECTED_FOTS_FAILURE (prod-ModuleImport modules-pub-priv-34 0)
183 EXPECTED_FOTS_FAILURE (prod-ModuleImport cbcl-module-004 0)
184-EXPECTED_FOTS_FAILURE (prod-OptionDecl K-OptionDeclarationProlog-1b 0)
185 EXPECTED_FOTS_FAILURE (prod-OptionDecl.serialization Serialization-003 0)
186 EXPECTED_FOTS_FAILURE (prod-OptionDecl.serialization Serialization-004 0)
187 EXPECTED_FOTS_FAILURE (prod-OptionDecl.serialization Serialization-005 0)

Subscribers

People subscribed via source and target branches