Merge lp:~zorba-coders/zorba/bug-1189785-core into lp:zorba

Proposed by Chris Hillery
Status: Merged
Merged at revision: 11556
Proposed branch: lp:~zorba-coders/zorba/bug-1189785-core
Merge into: lp:zorba
Diff against target: 268 lines (+55/-40)
13 files modified
modules/CMakeLists.txt (+1/-0)
modules/base64/CMakeLists.txt (+16/-0)
modules/base64/base64.xq (+27/-27)
modules/com/zorba-xquery/www/modules/CMakeLists.txt (+0/-2)
modules/com/zorba-xquery/www/modules/debugger/dbgp-message-handler.xq (+1/-1)
src/context/static_context.cpp (+1/-1)
src/functions/pregenerated/func_base64.cpp (+3/-3)
src/runtime/spec/mappings.xml (+1/-1)
test/rbkt/Queries/zorba/base64/decode_iso-8859-1.xq (+1/-1)
test/rbkt/Queries/zorba/base64/decode_iso-8859-1_file.xq (+1/-1)
test/rbkt/Queries/zorba/base64/file_read_2.xq (+1/-1)
test/rbkt/Queries/zorba/fetch/fetch_seekable_binary.xq (+1/-1)
test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm (+1/-1)
To merge this branch: bzr merge lp:~zorba-coders/zorba/bug-1189785-core
Reviewer Review Type Date Requested Status
Luis Rodriguez Gonzalez Approve
Chris Hillery Approve
Review via email: mp+175204@code.launchpad.net

Commit message

Update base64 module to Zorba 3.0 standards.

To post a comment you must log in.
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 result for https://code.launchpad.net/~zorba-coders/zorba/bug-1189785-core/+merge/175204

Stage "ZorbaVQ" failed.

Check console output at http://jenkins.lambda.nu/job/ZorbaVQ/121/console to view the results.

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

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/bug-1189785-core/+merge/175204

Stage "TestZorbaUbuntu" failed.
19 tests failed (8355 total tests run).

Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/91/testReport/ to view the results.

11557. By Chris Hillery

Typo.

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

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/bug-1189785-core/+merge/175204

Stage "TestZorbaUbuntu" failed.
1 tests failed (8355 total tests run).

Check test results at http://jenkins.lambda.nu/job/TestZorbaUbuntu/92/testReport/ to view the results.

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

Validation queue result for https://code.launchpad.net/~zorba-coders/zorba/bug-1189785-core/+merge/175204

Stage "CommitZorba" failed.

Check console output at http://jenkins.lambda.nu/job/CommitZorba/38/console to view the results.

Revision history for this message
Luis Rodriguez Gonzalez (kuraru) :
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 succeeded - proposal merged!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'modules/CMakeLists.txt'
2--- modules/CMakeLists.txt 2013-07-11 00:55:07 +0000
3+++ modules/CMakeLists.txt 2013-07-17 08:03:30 +0000
4@@ -20,6 +20,7 @@
5 ADD_SUBDIRECTORY(full-text)
6 ADD_SUBDIRECTORY(json)
7 ADD_SUBDIRECTORY(nodes)
8+ADD_SUBDIRECTORY(base64)
9
10 # Add external module projects - any subdirectories of a directory
11 # named "zorba_modules" as a sibling to the main Zorba source
12
13=== added directory 'modules/base64'
14=== added file 'modules/base64/CMakeLists.txt'
15--- modules/base64/CMakeLists.txt 1970-01-01 00:00:00 +0000
16+++ modules/base64/CMakeLists.txt 2013-07-17 08:03:30 +0000
17@@ -0,0 +1,16 @@
18+# Copyright 2013 The FLWOR Foundation.
19+#
20+# Licensed under the Apache License, Version 2.0 (the "License");
21+# you may not use this file except in compliance with the License.
22+# You may obtain a copy of the License at
23+#
24+# http://www.apache.org/licenses/LICENSE-2.0
25+#
26+# Unless required by applicable law or agreed to in writing, software
27+# distributed under the License is distributed on an "AS IS" BASIS,
28+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
29+# See the License for the specific language governing permissions and
30+# limitations under the License.
31+
32+DECLARE_ZORBA_MODULE(FILE base64.xq VERSION 1.0
33+ URI "http://zorba.io/modules/base64")
34
35=== renamed file 'modules/com/zorba-xquery/www/modules/converters/base64.xq' => 'modules/base64/base64.xq'
36--- modules/com/zorba-xquery/www/modules/converters/base64.xq 2013-06-25 03:55:20 +0000
37+++ modules/base64/base64.xq 2013-07-17 08:03:30 +0000
38@@ -1,4 +1,4 @@
39-xquery version "1.0";
40+jsoniq version "1.0";
41
42 (:
43 : Copyright 2006-2009 The FLWOR Foundation.
44@@ -17,58 +17,58 @@
45 :)
46
47 (:~
48- : Base64 encoding and decoding
49+ : <p>Base64 encoding and decoding.</p>
50 :
51 : @author Matthias Brantner
52 :
53 : @project Zorba/Data Converters/Base 64
54 :)
55-module namespace base64 = "http://www.zorba-xquery.com/modules/converters/base64";
56+module namespace base64 = "http://zorba.io/modules/base64";
57
58 declare namespace zerr = "http://zorba.io/modules/zorba-errors";
59
60 declare namespace ver = "http://www.zorba-xquery.com/options/versioning";
61-declare option ver:module-version "2.0";
62+declare option ver:module-version "1.0";
63
64 (:~
65- : Decode a xs:base64Binary.
66- :
67- : The function assumes that the content after decoding is valid
68- : UTF-8.
69- :
70- : @param $base64 The xs:base64Binary item to decode
71+ : <p>Decode a base64Binary.</p>
72+ :
73+ : <p>The function assumes that the content after decoding is valid
74+ : UTF-8.</p>
75+ :
76+ : @param $base64 The base64Binary item to decode
77 : @return the base64-decoded value as string
78- * @error zerr:ZOSE0006 if $base64 contains invalid base-64 data.
79+ : @error zerr:ZOSE0006 if $base64 contains invalid base-64 data.
80 :)
81-declare function base64:decode($base64 as xs:base64Binary)
82-as xs:string external;
83+declare function base64:decode($base64 as base64Binary)
84+as string external;
85
86 (:~
87- : Decode a xs:base64Binary.
88- :
89- : The function assumes that the content after decoding has
90- : the given encoding.
91- :
92- : @param $base64 The xs:base64Binary item to decode
93+ : <p>Decode a base64Binary.</p>
94+ :
95+ : <p>The function assumes that the content after decoding has
96+ : the given encoding.</p>
97+ :
98+ : @param $base64 The base64Binary item to decode
99 : @param $encoding The encoding of the string after base64-decoding it.
100- : If compiled with ICU, then Zorba supports any encoding that ICU supports;
101- : otherwise Zorba only supports ASCII and UTF-8.
102 : The encoding parameter is case insensitive.
103 :
104 : @return the base64-decoded value as a string
105 :
106 : @error zerr:ZXQP0006 if the given encoding is invalid or not supported.
107- * @error zerr:ZOSE0006 if $base64 contains invalid base-64 data.
108+ : "ASCII" and "UTF-8" are guaranteed to be supported; other encodings
109+ : may be supported depending on the installation.
110+ : @error zerr:ZOSE0006 if $base64 contains invalid base-64 data.
111 :)
112 declare function base64:decode(
113- $base64 as xs:base64Binary,
114- $encoding as xs:string)
115-as xs:string external;
116+ $base64 as base64Binary,
117+ $encoding as string)
118+as string external;
119
120 (:~
121- : Encode a xs:string as xs:base64Binary.
122+ : <p>Encode a string as base64Binary.</p>
123 :
124 : @param $string The item whose string-value should be encoded
125 : @return the base64-encoded string-value of the item parameter
126 :)
127-declare function base64:encode($string as xs:string) as xs:base64Binary external;
128+declare function base64:encode($string as string) as base64Binary external;
129
130=== modified file 'modules/com/zorba-xquery/www/modules/CMakeLists.txt'
131--- modules/com/zorba-xquery/www/modules/CMakeLists.txt 2013-07-11 00:55:07 +0000
132+++ modules/com/zorba-xquery/www/modules/CMakeLists.txt 2013-07-17 08:03:30 +0000
133@@ -86,8 +86,6 @@
134 URI "http://www.zorba-xquery.com/modules/xqdoc-options")
135
136 # Subdirectories
137-DECLARE_ZORBA_MODULE(FILE converters/base64.xq VERSION 2.0
138- URI "http://www.zorba-xquery.com/modules/converters/base64")
139 DECLARE_ZORBA_MODULE(FILE introspection/sctx.xq VERSION 2.0
140 URI "http://www.zorba-xquery.com/modules/introspection/sctx")
141
142
143=== removed directory 'modules/com/zorba-xquery/www/modules/converters'
144=== modified file 'modules/com/zorba-xquery/www/modules/debugger/dbgp-message-handler.xq'
145--- modules/com/zorba-xquery/www/modules/debugger/dbgp-message-handler.xq 2013-06-15 20:57:44 +0000
146+++ modules/com/zorba-xquery/www/modules/debugger/dbgp-message-handler.xq 2013-07-17 08:03:30 +0000
147@@ -24,7 +24,7 @@
148 :)
149 module namespace dmh = "http://www.zorba-xquery.com/modules/debugger/dbgp-message-handler";
150
151-import module namespace base64 = "http://www.zorba-xquery.com/modules/converters/base64";
152+import module namespace base64 = "http://zorba.io/modules/base64";
153
154 declare namespace ver = "http://www.zorba-xquery.com/options/versioning";
155 declare option ver:module-version "1.0";
156
157=== modified file 'src/context/static_context.cpp'
158--- src/context/static_context.cpp 2013-07-11 22:46:20 +0000
159+++ src/context/static_context.cpp 2013-07-17 08:03:30 +0000
160@@ -357,7 +357,7 @@
161
162 const char*
163 static_context::ZORBA_BASE64_FN_NS =
164-"http://www.zorba-xquery.com/modules/converters/base64";
165+"http://zorba.io/modules/base64";
166
167 const char*
168 static_context::ZORBA_JSON_FN_NS =
169
170=== modified file 'src/functions/pregenerated/func_base64.cpp'
171--- src/functions/pregenerated/func_base64.cpp 2013-03-05 23:11:50 +0000
172+++ src/functions/pregenerated/func_base64.cpp 2013-07-17 08:03:30 +0000
173@@ -57,7 +57,7 @@
174
175 {
176 DECL_WITH_KIND(sctx, fn_zorba_base64_decode,
177- (createQName("http://www.zorba-xquery.com/modules/converters/base64","","decode"),
178+ (createQName("http://zorba.io/modules/base64","","decode"),
179 GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE,
180 GENV_TYPESYSTEM.STRING_TYPE_ONE),
181 FunctionConsts::FN_ZORBA_BASE64_DECODE_1);
182@@ -69,7 +69,7 @@
183
184 {
185 DECL_WITH_KIND(sctx, fn_zorba_base64_decode,
186- (createQName("http://www.zorba-xquery.com/modules/converters/base64","","decode"),
187+ (createQName("http://zorba.io/modules/base64","","decode"),
188 GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE,
189 GENV_TYPESYSTEM.STRING_TYPE_ONE,
190 GENV_TYPESYSTEM.STRING_TYPE_ONE),
191@@ -82,7 +82,7 @@
192
193 {
194 DECL_WITH_KIND(sctx, fn_zorba_base64_encode,
195- (createQName("http://www.zorba-xquery.com/modules/converters/base64","","encode"),
196+ (createQName("http://zorba.io/modules/base64","","encode"),
197 GENV_TYPESYSTEM.STRING_TYPE_ONE,
198 GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE),
199 FunctionConsts::FN_ZORBA_BASE64_ENCODE_1);
200
201=== modified file 'src/runtime/spec/mappings.xml'
202--- src/runtime/spec/mappings.xml 2013-07-11 00:55:07 +0000
203+++ src/runtime/spec/mappings.xml 2013-07-17 08:03:30 +0000
204@@ -16,7 +16,7 @@
205 define="ZORBA_MATH_FN_NS"
206 prefix="fn-zorba-math"/>
207
208- <zorba:namespace uri="http://www.zorba-xquery.com/modules/converters/base64"
209+ <zorba:namespace uri="http://zorba.io/modules/base64"
210 define="ZORBA_BASE64_FN_NS"
211 prefix="fn-zorba-base64"/>
212
213
214=== modified file 'test/rbkt/Queries/zorba/base64/decode_iso-8859-1.xq'
215--- test/rbkt/Queries/zorba/base64/decode_iso-8859-1.xq 2012-05-08 03:17:32 +0000
216+++ test/rbkt/Queries/zorba/base64/decode_iso-8859-1.xq 2013-07-17 08:03:30 +0000
217@@ -1,3 +1,3 @@
218-import module namespace b = "http://www.zorba-xquery.com/modules/converters/base64";
219+import module namespace b = "http://zorba.io/modules/base64";
220
221 b:decode(xs:base64Binary("5Pb8Cg=="), "ISO-8859-1")
222
223=== modified file 'test/rbkt/Queries/zorba/base64/decode_iso-8859-1_file.xq'
224--- test/rbkt/Queries/zorba/base64/decode_iso-8859-1_file.xq 2012-05-08 03:17:32 +0000
225+++ test/rbkt/Queries/zorba/base64/decode_iso-8859-1_file.xq 2013-07-17 08:03:30 +0000
226@@ -1,5 +1,5 @@
227 import module namespace f = "http://expath.org/ns/file";
228-import module namespace b = "http://www.zorba-xquery.com/modules/converters/base64";
229+import module namespace b = "http://zorba.io/modules/base64";
230
231 b:decode(xs:base64Binary(f:read-text(resolve-uri("iso-8859-1.txt"))), "ISO-8859-1")
232
233
234=== modified file 'test/rbkt/Queries/zorba/base64/file_read_2.xq'
235--- test/rbkt/Queries/zorba/base64/file_read_2.xq 2012-02-22 01:31:08 +0000
236+++ test/rbkt/Queries/zorba/base64/file_read_2.xq 2013-07-17 08:03:30 +0000
237@@ -1,5 +1,5 @@
238 import module namespace f = "http://expath.org/ns/file";
239-import module namespace b = "http://www.zorba-xquery.com/modules/converters/base64";
240+import module namespace b = "http://zorba.io/modules/base64";
241
242 variable $enc-file-name := resolve-uri("encoded-text");
243 variable $dec-file-name := resolve-uri("decoded-text");
244
245=== modified file 'test/rbkt/Queries/zorba/fetch/fetch_seekable_binary.xq'
246--- test/rbkt/Queries/zorba/fetch/fetch_seekable_binary.xq 2012-05-09 21:48:57 +0000
247+++ test/rbkt/Queries/zorba/fetch/fetch_seekable_binary.xq 2013-07-17 08:03:30 +0000
248@@ -1,6 +1,6 @@
249 import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch";
250
251-import module namespace b = "http://www.zorba-xquery.com/modules/converters/base64";
252+import module namespace b = "http://zorba.io/modules/base64";
253
254 (: make sure the returned string is streamable and can be consumed twice, i.e. is seekable :)
255 let $x := fetch:content-binary(fn:resolve-uri("iso-8859-1.txt"))
256
257=== modified file 'test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm'
258--- test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm 2013-06-25 03:55:20 +0000
259+++ test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm 2013-07-17 08:03:30 +0000
260@@ -495,7 +495,7 @@
261 <span>data converters</span>
262 <ul>
263 <li>
264- <a href="www.zorba-xquery.com_modules_converters_base64.html" title="http://www.zorba-xquery.com/modules/converters/base64">base64</a>
265+ <a href="www.zorba-xquery.com_modules_converters_base64.html" title="http://zorba.io/modules/base64">base64</a>
266 <sup>
267 <a href="http://www.w3.org/TR/xquery-30/#dt-external-function" target="_blank" title="There are external functions (either private or public) declared in this module.">(E)</a>
268 </sup>

Subscribers

People subscribed via source and target branches