Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba

Proposed by Markos Zaharioudakis
Status: Merged
Approved by: Markos Zaharioudakis
Approved revision: 11137
Merged at revision: 11498
Proposed branch: lp:~zorba-coders/zorba/markos-scratch
Merge into: lp:zorba
Diff against target: 125 lines (+15/-10)
7 files modified
src/compiler/translator/translator.cpp (+4/-4)
src/context/root_static_context.cpp (+1/-2)
src/context/static_context.cpp (+3/-0)
src/context/static_context.h (+3/-0)
src/zorbamisc/ns_consts.h (+1/-4)
test/rbkt/ExpQueryResults/zorba/jsoniq/math_01.xml.res (+1/-0)
test/rbkt/Queries/zorba/jsoniq/math_01.jq (+2/-0)
To merge this branch: bzr merge lp:~zorba-coders/zorba/markos-scratch
Reviewer Review Type Date Requested Status
Markos Zaharioudakis Approve
Review via email: mp+168277@code.launchpad.net

Commit message

no math prefix required for jsoniq

Description of the change

no math prefix required for jsoniq

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 markos-scratch-2013-06-09T08-17-57.036Z 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/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp 2013-06-08 05:33:57 +0000
+++ src/compiler/translator/translator.cpp 2013-06-09 08:16:26 +0000
@@ -3896,7 +3896,7 @@
3896 ns == XML_NS ||3896 ns == XML_NS ||
3897 ns == XML_SCHEMA_NS ||3897 ns == XML_SCHEMA_NS ||
3898 ns == XSI_NS ||3898 ns == XSI_NS ||
3899 ns == XQUERY_MATH_FN_NS)3899 ns == static_context::XQUERY_MATH_FN_NS)
3900 {3900 {
3901 RAISE_ERROR(err::XQST0045, func_decl->get_location(),3901 RAISE_ERROR(err::XQST0045, func_decl->get_location(),
3902 ERROR_PARAMS(qnameItem->getLocalName(), ZED(FUNCTION), ns));3902 ERROR_PARAMS(qnameItem->getLocalName(), ZED(FUNCTION), ns));
@@ -4824,7 +4824,7 @@
4824 annotNS == XML_SCHEMA_NS ||4824 annotNS == XML_SCHEMA_NS ||
4825 annotNS == XSI_NS ||4825 annotNS == XSI_NS ||
4826 annotNS == static_context::W3C_FN_NS ||4826 annotNS == static_context::W3C_FN_NS ||
4827 annotNS == XQUERY_MATH_FN_NS ||4827 annotNS == static_context::XQUERY_MATH_FN_NS ||
4828 annotNS == ZORBA_ANNOTATIONS_NS)4828 annotNS == ZORBA_ANNOTATIONS_NS)
4829 {4829 {
4830 if (AnnotationInternal::lookup(expandedQName) == AnnotationInternal::zann_end)4830 if (AnnotationInternal::lookup(expandedQName) == AnnotationInternal::zann_end)
@@ -11606,7 +11606,7 @@
11606 if (f->isBuiltin() &&11606 if (f->isBuiltin() &&
11607 fn_ns != static_context::W3C_FN_NS &&11607 fn_ns != static_context::W3C_FN_NS &&
11608 fn_ns != static_context::JSONIQ_FN_NS &&11608 fn_ns != static_context::JSONIQ_FN_NS &&
11609 fn_ns != XQUERY_MATH_FN_NS &&11609 fn_ns != static_context::XQUERY_MATH_FN_NS &&
11610 fn_ns != theModuleNamespace)11610 fn_ns != theModuleNamespace)
11611 {11611 {
11612 if (! theSctx->is_imported_builtin_module(fn_ns))11612 if (! theSctx->is_imported_builtin_module(fn_ns))
@@ -12521,7 +12521,7 @@
12521 if (f->isBuiltin() &&12521 if (f->isBuiltin() &&
12522 fn_ns != static_context::W3C_FN_NS &&12522 fn_ns != static_context::W3C_FN_NS &&
12523 fn_ns != static_context::JSONIQ_FN_NS &&12523 fn_ns != static_context::JSONIQ_FN_NS &&
12524 fn_ns != XQUERY_MATH_FN_NS &&12524 fn_ns != static_context::XQUERY_MATH_FN_NS &&
12525 fn_ns != theModuleNamespace)12525 fn_ns != theModuleNamespace)
12526 {12526 {
12527 if (! theSctx->is_imported_builtin_module(fn_ns))12527 if (! theSctx->is_imported_builtin_module(fn_ns))
1252812528
=== modified file 'src/context/root_static_context.cpp'
--- src/context/root_static_context.cpp 2013-05-15 10:00:58 +0000
+++ src/context/root_static_context.cpp 2013-06-09 08:16:26 +0000
@@ -138,10 +138,8 @@
138 {138 {
139 //"err", XQUERY_ERR_NS,139 //"err", XQUERY_ERR_NS,
140 "fn", static_context::W3C_FN_NS,140 "fn", static_context::W3C_FN_NS,
141#ifdef ZORBA_WITH_JSON
142 "jn", static_context::JSONIQ_FN_NS,141 "jn", static_context::JSONIQ_FN_NS,
143 "js", static_context::JSONIQ_DM_NS,142 "js", static_context::JSONIQ_DM_NS,
144#endif
145 "local", XQUERY_LOCAL_FN_NS,143 "local", XQUERY_LOCAL_FN_NS,
146 "xml", XML_NS,144 "xml", XML_NS,
147 "xs", XML_SCHEMA_NS,145 "xs", XML_SCHEMA_NS,
@@ -158,6 +156,7 @@
158156
159 set_default_elem_type_ns(zstring(), true, loc); 157 set_default_elem_type_ns(zstring(), true, loc);
160158
159 set_default_function_ns(XQUERY_MATH_FN_NS, false, loc);
161 set_default_function_ns(JSONIQ_FN_NS, false, loc);160 set_default_function_ns(JSONIQ_FN_NS, false, loc);
162 set_default_function_ns(W3C_FN_NS, false, loc);161 set_default_function_ns(W3C_FN_NS, false, loc);
163162
164163
=== modified file 'src/context/static_context.cpp'
--- src/context/static_context.cpp 2013-04-23 13:12:58 +0000
+++ src/context/static_context.cpp 2013-06-09 08:16:26 +0000
@@ -340,6 +340,9 @@
340static_context::W3C_XML_NS = "http://www.w3.org/XML/1998/namespace";340static_context::W3C_XML_NS = "http://www.w3.org/XML/1998/namespace";
341341
342const char*342const char*
343static_context::XQUERY_MATH_FN_NS = "http://www.w3.org/2005/xpath-functions/math";
344
345const char*
343static_context::ZORBA_MATH_FN_NS =346static_context::ZORBA_MATH_FN_NS =
344"http://www.zorba-xquery.com/modules/math";347"http://www.zorba-xquery.com/modules/math";
345348
346349
=== modified file 'src/context/static_context.h'
--- src/context/static_context.h 2013-04-27 03:30:17 +0000
+++ src/context/static_context.h 2013-06-09 08:16:26 +0000
@@ -503,6 +503,9 @@
503 503
504 static const char* W3C_ERR_NS; // http://www.w3.org/2005/xqt-errors504 static const char* W3C_ERR_NS; // http://www.w3.org/2005/xqt-errors
505505
506 static const char* XQUERY_MATH_FN_NS; // http://www.w3.org/2005/xpath-functions/math
507 // not predeclared in XQuery 3.0
508
506 //509 //
507 // Zorba namespaces510 // Zorba namespaces
508 //511 //
509512
=== modified file 'src/zorbamisc/ns_consts.h'
--- src/zorbamisc/ns_consts.h 2013-02-07 17:24:36 +0000
+++ src/zorbamisc/ns_consts.h 2013-06-09 08:16:26 +0000
@@ -33,16 +33,13 @@
33#define XML_SCHEMA_NS W3C_NS "2001/XMLSchema"33#define XML_SCHEMA_NS W3C_NS "2001/XMLSchema"
34#define XML_SCHEMA_PREFIX "xs"34#define XML_SCHEMA_PREFIX "xs"
3535
36#define XQUERY_ERR_NS W3C_NS "2005/xqt-errors" //not predeclared in XQuery 3.036#define XQUERY_ERR_NS W3C_NS "2005/xqt-errors" //not predeclared in XQuery 3.0
37#define XQUERY_LOCAL_FN_NS W3C_NS "2005/xquery-local-functions"37#define XQUERY_LOCAL_FN_NS W3C_NS "2005/xquery-local-functions"
38#define XQUERY_XPATH_FN_NS W3C_NS "2005/xpath-functions"38#define XQUERY_XPATH_FN_NS W3C_NS "2005/xpath-functions"
39#define XQUERY_MATH_FN_NS W3C_NS "2005/xpath-functions/math" //not predeclared in XQuery 3.0
4039
41#define XSI_NS W3C_NS "2001/XMLSchema-instance"40#define XSI_NS W3C_NS "2001/XMLSchema-instance"
4241
43#ifdef ZORBA_WITH_JSON
44#define JSONIQ_ERR_NS "http://jsoniq.org/errors"42#define JSONIQ_ERR_NS "http://jsoniq.org/errors"
45#endif
4643
47///////////////////////////////////////////////////////////////////////////////44///////////////////////////////////////////////////////////////////////////////
4845
4946
=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/math_01.xml.res'
--- test/rbkt/ExpQueryResults/zorba/jsoniq/math_01.xml.res 1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/jsoniq/math_01.xml.res 2013-06-09 08:16:26 +0000
@@ -0,0 +1,1 @@
1{ "pi" : 3.1415926535897931 }
02
=== added file 'test/rbkt/Queries/zorba/jsoniq/math_01.jq'
--- test/rbkt/Queries/zorba/jsoniq/math_01.jq 1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/jsoniq/math_01.jq 2013-06-09 08:16:26 +0000
@@ -0,0 +1,2 @@
1
2{ "pi" : pi() }

Subscribers

People subscribed via source and target branches