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
=== modified file 'modules/CMakeLists.txt'
--- modules/CMakeLists.txt 2013-07-11 00:55:07 +0000
+++ modules/CMakeLists.txt 2013-07-17 08:03:30 +0000
@@ -20,6 +20,7 @@
20ADD_SUBDIRECTORY(full-text)20ADD_SUBDIRECTORY(full-text)
21ADD_SUBDIRECTORY(json)21ADD_SUBDIRECTORY(json)
22ADD_SUBDIRECTORY(nodes)22ADD_SUBDIRECTORY(nodes)
23ADD_SUBDIRECTORY(base64)
2324
24# Add external module projects - any subdirectories of a directory25# Add external module projects - any subdirectories of a directory
25# named "zorba_modules" as a sibling to the main Zorba source26# named "zorba_modules" as a sibling to the main Zorba source
2627
=== added directory 'modules/base64'
=== added file 'modules/base64/CMakeLists.txt'
--- modules/base64/CMakeLists.txt 1970-01-01 00:00:00 +0000
+++ modules/base64/CMakeLists.txt 2013-07-17 08:03:30 +0000
@@ -0,0 +1,16 @@
1# Copyright 2013 The FLWOR Foundation.
2#
3# Licensed under the Apache License, Version 2.0 (the "License");
4# you may not use this file except in compliance with the License.
5# You may obtain a copy of the License at
6#
7# http://www.apache.org/licenses/LICENSE-2.0
8#
9# Unless required by applicable law or agreed to in writing, software
10# distributed under the License is distributed on an "AS IS" BASIS,
11# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12# See the License for the specific language governing permissions and
13# limitations under the License.
14
15DECLARE_ZORBA_MODULE(FILE base64.xq VERSION 1.0
16 URI "http://zorba.io/modules/base64")
017
=== renamed file 'modules/com/zorba-xquery/www/modules/converters/base64.xq' => 'modules/base64/base64.xq'
--- modules/com/zorba-xquery/www/modules/converters/base64.xq 2013-06-25 03:55:20 +0000
+++ modules/base64/base64.xq 2013-07-17 08:03:30 +0000
@@ -1,4 +1,4 @@
1xquery version "1.0";1jsoniq version "1.0";
22
3(:3(:
4 : Copyright 2006-2009 The FLWOR Foundation.4 : Copyright 2006-2009 The FLWOR Foundation.
@@ -17,58 +17,58 @@
17:)17:)
1818
19(:~19(:~
20 : Base64 encoding and decoding20 : <p>Base64 encoding and decoding.</p>
21 :21 :
22 : @author Matthias Brantner22 : @author Matthias Brantner
23 :23 :
24 : @project Zorba/Data Converters/Base 6424 : @project Zorba/Data Converters/Base 64
25 :)25 :)
26module namespace base64 = "http://www.zorba-xquery.com/modules/converters/base64";26module namespace base64 = "http://zorba.io/modules/base64";
2727
28declare namespace zerr = "http://zorba.io/modules/zorba-errors";28declare namespace zerr = "http://zorba.io/modules/zorba-errors";
2929
30declare namespace ver = "http://www.zorba-xquery.com/options/versioning";30declare namespace ver = "http://www.zorba-xquery.com/options/versioning";
31declare option ver:module-version "2.0";31declare option ver:module-version "1.0";
3232
33(:~33(:~
34 : Decode a xs:base64Binary.34 : <p>Decode a base64Binary.</p>
35 :35 :
36 : The function assumes that the content after decoding is valid36 : <p>The function assumes that the content after decoding is valid
37 : UTF-8.37 : UTF-8.</p>
38 :38 :
39 : @param $base64 The xs:base64Binary item to decode39 : @param $base64 The base64Binary item to decode
40 : @return the base64-decoded value as string40 : @return the base64-decoded value as string
41 * @error zerr:ZOSE0006 if $base64 contains invalid base-64 data.41 : @error zerr:ZOSE0006 if $base64 contains invalid base-64 data.
42 :)42 :)
43declare function base64:decode($base64 as xs:base64Binary)43declare function base64:decode($base64 as base64Binary)
44as xs:string external;44as string external;
4545
46(:~46(:~
47 : Decode a xs:base64Binary.47 : <p>Decode a base64Binary.</p>
48 :48 :
49 : The function assumes that the content after decoding has49 : <p>The function assumes that the content after decoding has
50 : the given encoding.50 : the given encoding.</p>
51 :51 :
52 : @param $base64 The xs:base64Binary item to decode52 : @param $base64 The base64Binary item to decode
53 : @param $encoding The encoding of the string after base64-decoding it.53 : @param $encoding The encoding of the string after base64-decoding it.
54 : If compiled with ICU, then Zorba supports any encoding that ICU supports;
55 : otherwise Zorba only supports ASCII and UTF-8.
56 : The encoding parameter is case insensitive.54 : The encoding parameter is case insensitive.
57 :55 :
58 : @return the base64-decoded value as a string56 : @return the base64-decoded value as a string
59 :57 :
60 : @error zerr:ZXQP0006 if the given encoding is invalid or not supported.58 : @error zerr:ZXQP0006 if the given encoding is invalid or not supported.
61 * @error zerr:ZOSE0006 if $base64 contains invalid base-64 data.59 : "ASCII" and "UTF-8" are guaranteed to be supported; other encodings
60 : may be supported depending on the installation.
61 : @error zerr:ZOSE0006 if $base64 contains invalid base-64 data.
62 :)62 :)
63declare function base64:decode(63declare function base64:decode(
64 $base64 as xs:base64Binary,64 $base64 as base64Binary,
65 $encoding as xs:string)65 $encoding as string)
66as xs:string external;66as string external;
6767
68(:~68(:~
69 : Encode a xs:string as xs:base64Binary.69 : <p>Encode a string as base64Binary.</p>
70 :70 :
71 : @param $string The item whose string-value should be encoded71 : @param $string The item whose string-value should be encoded
72 : @return the base64-encoded string-value of the item parameter72 : @return the base64-encoded string-value of the item parameter
73 :)73 :)
74declare function base64:encode($string as xs:string) as xs:base64Binary external;74declare function base64:encode($string as string) as base64Binary external;
7575
=== modified file 'modules/com/zorba-xquery/www/modules/CMakeLists.txt'
--- modules/com/zorba-xquery/www/modules/CMakeLists.txt 2013-07-11 00:55:07 +0000
+++ modules/com/zorba-xquery/www/modules/CMakeLists.txt 2013-07-17 08:03:30 +0000
@@ -86,8 +86,6 @@
86 URI "http://www.zorba-xquery.com/modules/xqdoc-options") 86 URI "http://www.zorba-xquery.com/modules/xqdoc-options")
8787
88# Subdirectories88# Subdirectories
89DECLARE_ZORBA_MODULE(FILE converters/base64.xq VERSION 2.0
90 URI "http://www.zorba-xquery.com/modules/converters/base64")
91DECLARE_ZORBA_MODULE(FILE introspection/sctx.xq VERSION 2.089DECLARE_ZORBA_MODULE(FILE introspection/sctx.xq VERSION 2.0
92 URI "http://www.zorba-xquery.com/modules/introspection/sctx")90 URI "http://www.zorba-xquery.com/modules/introspection/sctx")
9391
9492
=== removed directory 'modules/com/zorba-xquery/www/modules/converters'
=== modified file 'modules/com/zorba-xquery/www/modules/debugger/dbgp-message-handler.xq'
--- modules/com/zorba-xquery/www/modules/debugger/dbgp-message-handler.xq 2013-06-15 20:57:44 +0000
+++ modules/com/zorba-xquery/www/modules/debugger/dbgp-message-handler.xq 2013-07-17 08:03:30 +0000
@@ -24,7 +24,7 @@
24 :)24 :)
25module namespace dmh = "http://www.zorba-xquery.com/modules/debugger/dbgp-message-handler";25module namespace dmh = "http://www.zorba-xquery.com/modules/debugger/dbgp-message-handler";
2626
27import module namespace base64 = "http://www.zorba-xquery.com/modules/converters/base64";27import module namespace base64 = "http://zorba.io/modules/base64";
2828
29declare namespace ver = "http://www.zorba-xquery.com/options/versioning";29declare namespace ver = "http://www.zorba-xquery.com/options/versioning";
30declare option ver:module-version "1.0";30declare option ver:module-version "1.0";
3131
=== modified file 'src/context/static_context.cpp'
--- src/context/static_context.cpp 2013-07-11 22:46:20 +0000
+++ src/context/static_context.cpp 2013-07-17 08:03:30 +0000
@@ -357,7 +357,7 @@
357357
358const char*358const char*
359static_context::ZORBA_BASE64_FN_NS =359static_context::ZORBA_BASE64_FN_NS =
360"http://www.zorba-xquery.com/modules/converters/base64";360"http://zorba.io/modules/base64";
361361
362const char*362const char*
363static_context::ZORBA_JSON_FN_NS =363static_context::ZORBA_JSON_FN_NS =
364364
=== modified file 'src/functions/pregenerated/func_base64.cpp'
--- src/functions/pregenerated/func_base64.cpp 2013-03-05 23:11:50 +0000
+++ src/functions/pregenerated/func_base64.cpp 2013-07-17 08:03:30 +0000
@@ -57,7 +57,7 @@
5757
58 {58 {
59 DECL_WITH_KIND(sctx, fn_zorba_base64_decode,59 DECL_WITH_KIND(sctx, fn_zorba_base64_decode,
60 (createQName("http://www.zorba-xquery.com/modules/converters/base64","","decode"), 60 (createQName("http://zorba.io/modules/base64","","decode"),
61 GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE, 61 GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE,
62 GENV_TYPESYSTEM.STRING_TYPE_ONE),62 GENV_TYPESYSTEM.STRING_TYPE_ONE),
63 FunctionConsts::FN_ZORBA_BASE64_DECODE_1);63 FunctionConsts::FN_ZORBA_BASE64_DECODE_1);
@@ -69,7 +69,7 @@
6969
70 {70 {
71 DECL_WITH_KIND(sctx, fn_zorba_base64_decode,71 DECL_WITH_KIND(sctx, fn_zorba_base64_decode,
72 (createQName("http://www.zorba-xquery.com/modules/converters/base64","","decode"), 72 (createQName("http://zorba.io/modules/base64","","decode"),
73 GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE, 73 GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE,
74 GENV_TYPESYSTEM.STRING_TYPE_ONE, 74 GENV_TYPESYSTEM.STRING_TYPE_ONE,
75 GENV_TYPESYSTEM.STRING_TYPE_ONE),75 GENV_TYPESYSTEM.STRING_TYPE_ONE),
@@ -82,7 +82,7 @@
8282
83 {83 {
84 DECL_WITH_KIND(sctx, fn_zorba_base64_encode,84 DECL_WITH_KIND(sctx, fn_zorba_base64_encode,
85 (createQName("http://www.zorba-xquery.com/modules/converters/base64","","encode"), 85 (createQName("http://zorba.io/modules/base64","","encode"),
86 GENV_TYPESYSTEM.STRING_TYPE_ONE, 86 GENV_TYPESYSTEM.STRING_TYPE_ONE,
87 GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE),87 GENV_TYPESYSTEM.BASE64BINARY_TYPE_ONE),
88 FunctionConsts::FN_ZORBA_BASE64_ENCODE_1);88 FunctionConsts::FN_ZORBA_BASE64_ENCODE_1);
8989
=== modified file 'src/runtime/spec/mappings.xml'
--- src/runtime/spec/mappings.xml 2013-07-11 00:55:07 +0000
+++ src/runtime/spec/mappings.xml 2013-07-17 08:03:30 +0000
@@ -16,7 +16,7 @@
16 define="ZORBA_MATH_FN_NS"16 define="ZORBA_MATH_FN_NS"
17 prefix="fn-zorba-math"/>17 prefix="fn-zorba-math"/>
1818
19 <zorba:namespace uri="http://www.zorba-xquery.com/modules/converters/base64"19 <zorba:namespace uri="http://zorba.io/modules/base64"
20 define="ZORBA_BASE64_FN_NS"20 define="ZORBA_BASE64_FN_NS"
21 prefix="fn-zorba-base64"/>21 prefix="fn-zorba-base64"/>
2222
2323
=== modified file 'test/rbkt/Queries/zorba/base64/decode_iso-8859-1.xq'
--- test/rbkt/Queries/zorba/base64/decode_iso-8859-1.xq 2012-05-08 03:17:32 +0000
+++ test/rbkt/Queries/zorba/base64/decode_iso-8859-1.xq 2013-07-17 08:03:30 +0000
@@ -1,3 +1,3 @@
1import module namespace b = "http://www.zorba-xquery.com/modules/converters/base64";1import module namespace b = "http://zorba.io/modules/base64";
22
3b:decode(xs:base64Binary("5Pb8Cg=="), "ISO-8859-1")3b:decode(xs:base64Binary("5Pb8Cg=="), "ISO-8859-1")
44
=== modified file 'test/rbkt/Queries/zorba/base64/decode_iso-8859-1_file.xq'
--- test/rbkt/Queries/zorba/base64/decode_iso-8859-1_file.xq 2012-05-08 03:17:32 +0000
+++ test/rbkt/Queries/zorba/base64/decode_iso-8859-1_file.xq 2013-07-17 08:03:30 +0000
@@ -1,5 +1,5 @@
1import module namespace f = "http://expath.org/ns/file";1import module namespace f = "http://expath.org/ns/file";
2import module namespace b = "http://www.zorba-xquery.com/modules/converters/base64";2import module namespace b = "http://zorba.io/modules/base64";
33
4b:decode(xs:base64Binary(f:read-text(resolve-uri("iso-8859-1.txt"))), "ISO-8859-1")4b:decode(xs:base64Binary(f:read-text(resolve-uri("iso-8859-1.txt"))), "ISO-8859-1")
55
66
=== modified file 'test/rbkt/Queries/zorba/base64/file_read_2.xq'
--- test/rbkt/Queries/zorba/base64/file_read_2.xq 2012-02-22 01:31:08 +0000
+++ test/rbkt/Queries/zorba/base64/file_read_2.xq 2013-07-17 08:03:30 +0000
@@ -1,5 +1,5 @@
1import module namespace f = "http://expath.org/ns/file";1import module namespace f = "http://expath.org/ns/file";
2import module namespace b = "http://www.zorba-xquery.com/modules/converters/base64";2import module namespace b = "http://zorba.io/modules/base64";
33
4variable $enc-file-name := resolve-uri("encoded-text");4variable $enc-file-name := resolve-uri("encoded-text");
5variable $dec-file-name := resolve-uri("decoded-text");5variable $dec-file-name := resolve-uri("decoded-text");
66
=== modified file 'test/rbkt/Queries/zorba/fetch/fetch_seekable_binary.xq'
--- test/rbkt/Queries/zorba/fetch/fetch_seekable_binary.xq 2012-05-09 21:48:57 +0000
+++ test/rbkt/Queries/zorba/fetch/fetch_seekable_binary.xq 2013-07-17 08:03:30 +0000
@@ -1,6 +1,6 @@
1import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch";1import module namespace fetch = "http://www.zorba-xquery.com/modules/fetch";
22
3import module namespace b = "http://www.zorba-xquery.com/modules/converters/base64";3import module namespace b = "http://zorba.io/modules/base64";
44
5(: make sure the returned string is streamable and can be consumed twice, i.e. is seekable :)5(: make sure the returned string is streamable and can be consumed twice, i.e. is seekable :)
6let $x := fetch:content-binary(fn:resolve-uri("iso-8859-1.txt"))6let $x := fetch:content-binary(fn:resolve-uri("iso-8859-1.txt"))
77
=== modified file 'test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm'
--- test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm 2013-06-25 03:55:20 +0000
+++ test/rbkt/Queries/zorba/string/AnalyzeString/http-client-doc.htm 2013-07-17 08:03:30 +0000
@@ -495,7 +495,7 @@
495 <span>data converters</span>495 <span>data converters</span>
496 <ul>496 <ul>
497 <li>497 <li>
498 <a href="www.zorba-xquery.com_modules_converters_base64.html" title="http://www.zorba-xquery.com/modules/converters/base64">base64</a>498 <a href="www.zorba-xquery.com_modules_converters_base64.html" title="http://zorba.io/modules/base64">base64</a>
499 <sup>499 <sup>
500 <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>500 <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>
501 </sup>501 </sup>

Subscribers

People subscribed via source and target branches