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
1=== modified file 'src/compiler/translator/translator.cpp'
2--- src/compiler/translator/translator.cpp 2013-06-08 05:33:57 +0000
3+++ src/compiler/translator/translator.cpp 2013-06-09 08:16:26 +0000
4@@ -3896,7 +3896,7 @@
5 ns == XML_NS ||
6 ns == XML_SCHEMA_NS ||
7 ns == XSI_NS ||
8- ns == XQUERY_MATH_FN_NS)
9+ ns == static_context::XQUERY_MATH_FN_NS)
10 {
11 RAISE_ERROR(err::XQST0045, func_decl->get_location(),
12 ERROR_PARAMS(qnameItem->getLocalName(), ZED(FUNCTION), ns));
13@@ -4824,7 +4824,7 @@
14 annotNS == XML_SCHEMA_NS ||
15 annotNS == XSI_NS ||
16 annotNS == static_context::W3C_FN_NS ||
17- annotNS == XQUERY_MATH_FN_NS ||
18+ annotNS == static_context::XQUERY_MATH_FN_NS ||
19 annotNS == ZORBA_ANNOTATIONS_NS)
20 {
21 if (AnnotationInternal::lookup(expandedQName) == AnnotationInternal::zann_end)
22@@ -11606,7 +11606,7 @@
23 if (f->isBuiltin() &&
24 fn_ns != static_context::W3C_FN_NS &&
25 fn_ns != static_context::JSONIQ_FN_NS &&
26- fn_ns != XQUERY_MATH_FN_NS &&
27+ fn_ns != static_context::XQUERY_MATH_FN_NS &&
28 fn_ns != theModuleNamespace)
29 {
30 if (! theSctx->is_imported_builtin_module(fn_ns))
31@@ -12521,7 +12521,7 @@
32 if (f->isBuiltin() &&
33 fn_ns != static_context::W3C_FN_NS &&
34 fn_ns != static_context::JSONIQ_FN_NS &&
35- fn_ns != XQUERY_MATH_FN_NS &&
36+ fn_ns != static_context::XQUERY_MATH_FN_NS &&
37 fn_ns != theModuleNamespace)
38 {
39 if (! theSctx->is_imported_builtin_module(fn_ns))
40
41=== modified file 'src/context/root_static_context.cpp'
42--- src/context/root_static_context.cpp 2013-05-15 10:00:58 +0000
43+++ src/context/root_static_context.cpp 2013-06-09 08:16:26 +0000
44@@ -138,10 +138,8 @@
45 {
46 //"err", XQUERY_ERR_NS,
47 "fn", static_context::W3C_FN_NS,
48-#ifdef ZORBA_WITH_JSON
49 "jn", static_context::JSONIQ_FN_NS,
50 "js", static_context::JSONIQ_DM_NS,
51-#endif
52 "local", XQUERY_LOCAL_FN_NS,
53 "xml", XML_NS,
54 "xs", XML_SCHEMA_NS,
55@@ -158,6 +156,7 @@
56
57 set_default_elem_type_ns(zstring(), true, loc);
58
59+ set_default_function_ns(XQUERY_MATH_FN_NS, false, loc);
60 set_default_function_ns(JSONIQ_FN_NS, false, loc);
61 set_default_function_ns(W3C_FN_NS, false, loc);
62
63
64=== modified file 'src/context/static_context.cpp'
65--- src/context/static_context.cpp 2013-04-23 13:12:58 +0000
66+++ src/context/static_context.cpp 2013-06-09 08:16:26 +0000
67@@ -340,6 +340,9 @@
68 static_context::W3C_XML_NS = "http://www.w3.org/XML/1998/namespace";
69
70 const char*
71+static_context::XQUERY_MATH_FN_NS = "http://www.w3.org/2005/xpath-functions/math";
72+
73+const char*
74 static_context::ZORBA_MATH_FN_NS =
75 "http://www.zorba-xquery.com/modules/math";
76
77
78=== modified file 'src/context/static_context.h'
79--- src/context/static_context.h 2013-04-27 03:30:17 +0000
80+++ src/context/static_context.h 2013-06-09 08:16:26 +0000
81@@ -503,6 +503,9 @@
82
83 static const char* W3C_ERR_NS; // http://www.w3.org/2005/xqt-errors
84
85+ static const char* XQUERY_MATH_FN_NS; // http://www.w3.org/2005/xpath-functions/math
86+ // not predeclared in XQuery 3.0
87+
88 //
89 // Zorba namespaces
90 //
91
92=== modified file 'src/zorbamisc/ns_consts.h'
93--- src/zorbamisc/ns_consts.h 2013-02-07 17:24:36 +0000
94+++ src/zorbamisc/ns_consts.h 2013-06-09 08:16:26 +0000
95@@ -33,16 +33,13 @@
96 #define XML_SCHEMA_NS W3C_NS "2001/XMLSchema"
97 #define XML_SCHEMA_PREFIX "xs"
98
99-#define XQUERY_ERR_NS W3C_NS "2005/xqt-errors" //not predeclared in XQuery 3.0
100+#define XQUERY_ERR_NS W3C_NS "2005/xqt-errors" //not predeclared in XQuery 3.0
101 #define XQUERY_LOCAL_FN_NS W3C_NS "2005/xquery-local-functions"
102 #define XQUERY_XPATH_FN_NS W3C_NS "2005/xpath-functions"
103-#define XQUERY_MATH_FN_NS W3C_NS "2005/xpath-functions/math" //not predeclared in XQuery 3.0
104
105 #define XSI_NS W3C_NS "2001/XMLSchema-instance"
106
107-#ifdef ZORBA_WITH_JSON
108 #define JSONIQ_ERR_NS "http://jsoniq.org/errors"
109-#endif
110
111 ///////////////////////////////////////////////////////////////////////////////
112
113
114=== added file 'test/rbkt/ExpQueryResults/zorba/jsoniq/math_01.xml.res'
115--- test/rbkt/ExpQueryResults/zorba/jsoniq/math_01.xml.res 1970-01-01 00:00:00 +0000
116+++ test/rbkt/ExpQueryResults/zorba/jsoniq/math_01.xml.res 2013-06-09 08:16:26 +0000
117@@ -0,0 +1,1 @@
118+{ "pi" : 3.1415926535897931 }
119
120=== added file 'test/rbkt/Queries/zorba/jsoniq/math_01.jq'
121--- test/rbkt/Queries/zorba/jsoniq/math_01.jq 1970-01-01 00:00:00 +0000
122+++ test/rbkt/Queries/zorba/jsoniq/math_01.jq 2013-06-09 08:16:26 +0000
123@@ -0,0 +1,2 @@
124+
125+{ "pi" : pi() }

Subscribers

People subscribed via source and target branches