Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba
- markos-scratch
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Markos Zaharioudakis |
Approved revision: | 11159 |
Merged at revision: | 11531 |
Proposed branch: | lp:~zorba-coders/zorba/markos-scratch |
Merge into: | lp:zorba |
Diff against target: |
1045 lines (+233/-176) 9 files modified
ChangeLog (+1/-0) src/compiler/translator/translator.cpp (+117/-125) src/diagnostics/diagnostic_en.xml (+69/-19) src/diagnostics/pregenerated/dict_en.cpp (+21/-9) src/diagnostics/pregenerated/dict_zed_keys.h (+16/-4) src/diagnostics/util_macros.h (+0/-5) src/runtime/core/constructors.cpp (+1/-1) src/store/naive/nsbindings.cpp (+8/-11) test/fots/CMakeLists.txt (+0/-2) |
To merge this branch: | bzr merge lp:~zorba-coders/zorba/markos-scratch |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Markos Zaharioudakis | Approve | ||
Review via email: mp+170572@code.launchpad.net |
Commit message
1. Check that namespace uri used in default namespace declaration is a valid one
2. fixed error messages for XQST0070 and XQST0036
Description of the change
1. Check that namespace uri used in default namespace declaration is a valid one
2. fixed error messages for XQST0070 and XQST0036
Markos Zaharioudakis (markos-za) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job markos-
The final status was:
4 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job markos-
All tests succeeded!
Preview Diff
1 | === modified file 'ChangeLog' | |||
2 | --- ChangeLog 2013-06-19 22:18:54 +0000 | |||
3 | +++ ChangeLog 2013-06-20 10:12:27 +0000 | |||
4 | @@ -32,6 +32,7 @@ | |||
5 | 32 | * Fixed bug #1103115 (Timezone units as hours are wrong) | 32 | * Fixed bug #1103115 (Timezone units as hours are wrong) |
6 | 33 | * Fixed bug #1188280 (casting xs:id to xs:ncname) | 33 | * Fixed bug #1188280 (casting xs:id to xs:ncname) |
7 | 34 | * Fixed bug in casting to xs:NCName | 34 | * Fixed bug in casting to xs:NCName |
8 | 35 | * Check that namespace uri used in default namespace declaration is a valid one | ||
9 | 35 | * Fixed bug in error conditions for computed PI constructor | 36 | * Fixed bug in error conditions for computed PI constructor |
10 | 36 | * Fixed implementation of fn:deep-equal according to latest W3C spec. | 37 | * Fixed implementation of fn:deep-equal according to latest W3C spec. |
11 | 37 | * Must apply document ordering on the domain expression of a FOR clause, if | 38 | * Must apply document ordering on the domain expression of a FOR clause, if |
12 | 38 | 39 | ||
13 | === modified file 'src/compiler/translator/translator.cpp' | |||
14 | --- src/compiler/translator/translator.cpp 2013-06-19 19:27:26 +0000 | |||
15 | +++ src/compiler/translator/translator.cpp 2013-06-20 10:12:27 +0000 | |||
16 | @@ -178,15 +178,7 @@ | |||
17 | 178 | /******************************************************************************* | 178 | /******************************************************************************* |
18 | 179 | 179 | ||
19 | 180 | ********************************************************************************/ | 180 | ********************************************************************************/ |
29 | 181 | #define ZANN_CONTAINS( ann ) theAnnotations->contains(AnnotationInternal::ann) | 181 | #define ZANN_CONTAINS(ann) theAnnotations->contains(AnnotationInternal::ann) |
21 | 182 | |||
22 | 183 | |||
23 | 184 | /******************************************************************************* | ||
24 | 185 | Check/set certain bool data members of TranslatorImpl: raise error if true | ||
25 | 186 | already otherwise set to true. | ||
26 | 187 | ********************************************************************************/ | ||
27 | 188 | #define CHK_SINGLE_DECL( state, err ) \ | ||
28 | 189 | do { if (state) throw XQUERY_EXCEPTION(err); state = true; } while (0) | ||
30 | 190 | 182 | ||
31 | 191 | 183 | ||
32 | 192 | /******************************************************************************* | 184 | /******************************************************************************* |
33 | @@ -2204,19 +2196,22 @@ | |||
34 | 2204 | #ifndef ZORBA_NO_XMLSCHEMA | 2196 | #ifndef ZORBA_NO_XMLSCHEMA |
35 | 2205 | 2197 | ||
36 | 2206 | if (! theImportedSchemas.insert(targetNS.str()).second) | 2198 | if (! theImportedSchemas.insert(targetNS.str()).second) |
38 | 2207 | throw XQUERY_EXCEPTION(err::XQST0058, ERROR_LOC(loc)); | 2199 | RAISE_ERROR(err::XQST0058, loc, ERROR_PARAMS(targetNS)); |
39 | 2208 | 2200 | ||
40 | 2209 | if (prefix != NULL) | 2201 | if (prefix != NULL) |
41 | 2210 | { | 2202 | { |
42 | 2211 | if (!prefix->get_default_bit() && targetNS.empty()) | 2203 | if (!prefix->get_default_bit() && targetNS.empty()) |
43 | 2212 | { | 2204 | { |
45 | 2213 | throw XQUERY_EXCEPTION( err::XQST0057, ERROR_LOC(loc)); | 2205 | RAISE_ERROR_NO_PARAMS(err::XQST0057, loc); |
46 | 2214 | } | 2206 | } |
47 | 2215 | 2207 | ||
48 | 2216 | zstring pfx = prefix->get_prefix(); | 2208 | zstring pfx = prefix->get_prefix(); |
49 | 2217 | 2209 | ||
50 | 2218 | if (pfx == "xml" || pfx == "xmlns") | 2210 | if (pfx == "xml" || pfx == "xmlns") |
52 | 2219 | RAISE_ERROR(err::XQST0070, loc, ERROR_PARAMS(pfx, ZED(NoRebindPrefix))); | 2211 | { |
53 | 2212 | RAISE_ERROR(err::XQST0070, loc, | ||
54 | 2213 | ERROR_PARAMS(ZED(XQST0070_ReservedPrefixInImport_2), pfx)); | ||
55 | 2214 | } | ||
56 | 2220 | 2215 | ||
57 | 2221 | if (prefix->get_default_bit()) | 2216 | if (prefix->get_default_bit()) |
58 | 2222 | theSctx->set_default_elem_type_ns(targetNS, true, loc); | 2217 | theSctx->set_default_elem_type_ns(targetNS, true, loc); |
59 | @@ -2226,7 +2221,7 @@ | |||
60 | 2226 | } | 2221 | } |
61 | 2227 | 2222 | ||
62 | 2228 | zstring xsdTNS = zstring(XML_SCHEMA_NS); | 2223 | zstring xsdTNS = zstring(XML_SCHEMA_NS); |
64 | 2229 | if ( xsdTNS.compare(targetNS)==0 ) | 2224 | if (xsdTNS.compare(targetNS) == 0) |
65 | 2230 | { | 2225 | { |
66 | 2231 | // Xerces doesn't like importing XMLSchema.xsd schema4schema, so we skip it | 2226 | // Xerces doesn't like importing XMLSchema.xsd schema4schema, so we skip it |
67 | 2232 | // see Xerces-C++ bug: https://issues.apache.org/jira/browse/XERCESC-1980 | 2227 | // see Xerces-C++ bug: https://issues.apache.org/jira/browse/XERCESC-1980 |
68 | @@ -2301,7 +2296,7 @@ | |||
69 | 2301 | return no_state; | 2296 | return no_state; |
70 | 2302 | 2297 | ||
71 | 2303 | #else | 2298 | #else |
73 | 2304 | throw XQUERY_EXCEPTION(err::XQST0009, ERROR_LOC(loc)); | 2299 | RAISE_ERROR_NO_PARAMS(err::XQST0009, loc); |
74 | 2305 | #endif | 2300 | #endif |
75 | 2306 | } | 2301 | } |
76 | 2307 | 2302 | ||
77 | @@ -2358,7 +2353,7 @@ | |||
78 | 2358 | return no_state; | 2353 | return no_state; |
79 | 2359 | 2354 | ||
80 | 2360 | #else | 2355 | #else |
82 | 2361 | throw XQUERY_EXCEPTION(err::XQST0009, ERROR_LOC(aLoc)); | 2356 | RAISE_ERROR_NO_PARAMS(err::XQST0009, aLoc); |
83 | 2362 | #endif | 2357 | #endif |
84 | 2363 | } | 2358 | } |
85 | 2364 | 2359 | ||
86 | @@ -2801,7 +2796,7 @@ | |||
87 | 2801 | theModuleNamespace = v.get_target_namespace(); | 2796 | theModuleNamespace = v.get_target_namespace(); |
88 | 2802 | 2797 | ||
89 | 2803 | if (theModuleNamespace.empty()) | 2798 | if (theModuleNamespace.empty()) |
91 | 2804 | throw XQUERY_EXCEPTION(err::XQST0088, ERROR_LOC(loc)); | 2799 | RAISE_ERROR_NO_PARAMS(err::XQST0088, loc); |
92 | 2805 | 2800 | ||
93 | 2806 | if (static_context::is_reserved_module(theModuleNamespace)) | 2801 | if (static_context::is_reserved_module(theModuleNamespace)) |
94 | 2807 | { | 2802 | { |
95 | @@ -2812,7 +2807,7 @@ | |||
96 | 2812 | if (theModulePrefix == "xml" || theModulePrefix == "xmlns") | 2807 | if (theModulePrefix == "xml" || theModulePrefix == "xmlns") |
97 | 2813 | { | 2808 | { |
98 | 2814 | RAISE_ERROR(err::XQST0070, loc, | 2809 | RAISE_ERROR(err::XQST0070, loc, |
100 | 2815 | ERROR_PARAMS(theModulePrefix, ZED(NoRebindPrefix))); | 2810 | ERROR_PARAMS(ZED(XQST0070_ReservedPrefixInModule_2), theModulePrefix)); |
101 | 2816 | } | 2811 | } |
102 | 2817 | 2812 | ||
103 | 2818 | theSctx->bind_ns(theModulePrefix, theModuleNamespace, loc); | 2813 | theSctx->bind_ns(theModulePrefix, theModuleNamespace, loc); |
104 | @@ -2998,7 +2993,12 @@ | |||
105 | 2998 | void* begin_visit(const BoundarySpaceDecl& v) | 2993 | void* begin_visit(const BoundarySpaceDecl& v) |
106 | 2999 | { | 2994 | { |
107 | 3000 | TRACE_VISIT(); | 2995 | TRACE_VISIT(); |
109 | 3001 | CHK_SINGLE_DECL (hadBSpaceDecl, err::XQST0068); | 2996 | |
110 | 2997 | if (hadBSpaceDecl) | ||
111 | 2998 | RAISE_ERROR_NO_PARAMS(err::XQST0068, loc); | ||
112 | 2999 | |||
113 | 3000 | hadBSpaceDecl = true; | ||
114 | 3001 | |||
115 | 3002 | theSctx->set_boundary_space_mode(v.get_boundary_space_mode()); | 3002 | theSctx->set_boundary_space_mode(v.get_boundary_space_mode()); |
116 | 3003 | return NULL; | 3003 | return NULL; |
117 | 3004 | } | 3004 | } |
118 | @@ -3015,7 +3015,12 @@ | |||
119 | 3015 | void* begin_visit(const OrderingModeDecl& v) | 3015 | void* begin_visit(const OrderingModeDecl& v) |
120 | 3016 | { | 3016 | { |
121 | 3017 | TRACE_VISIT(); | 3017 | TRACE_VISIT(); |
123 | 3018 | CHK_SINGLE_DECL(hadOrdModeDecl, err::XQST0065); | 3018 | |
124 | 3019 | if (hadOrdModeDecl) | ||
125 | 3020 | RAISE_ERROR_NO_PARAMS(err::XQST0065, loc); | ||
126 | 3021 | |||
127 | 3022 | hadOrdModeDecl = true; | ||
128 | 3023 | |||
129 | 3019 | theSctx->set_ordering_mode(v.get_mode()); | 3024 | theSctx->set_ordering_mode(v.get_mode()); |
130 | 3020 | return NULL; | 3025 | return NULL; |
131 | 3021 | } | 3026 | } |
132 | @@ -3035,7 +3040,10 @@ | |||
133 | 3035 | { | 3040 | { |
134 | 3036 | TRACE_VISIT(); | 3041 | TRACE_VISIT(); |
135 | 3037 | 3042 | ||
137 | 3038 | CHK_SINGLE_DECL(hadEmptyOrdDecl, err::XQST0069); | 3043 | if (hadEmptyOrdDecl) |
138 | 3044 | RAISE_ERROR_NO_PARAMS(err::XQST0069, loc); | ||
139 | 3045 | |||
140 | 3046 | hadEmptyOrdDecl = true; | ||
141 | 3039 | 3047 | ||
142 | 3040 | theSctx->set_empty_order_mode(v.get_mode()); | 3048 | theSctx->set_empty_order_mode(v.get_mode()); |
143 | 3041 | return no_state; | 3049 | return no_state; |
144 | @@ -3056,7 +3064,12 @@ | |||
145 | 3056 | void* begin_visit(const CopyNamespacesDecl& v) | 3064 | void* begin_visit(const CopyNamespacesDecl& v) |
146 | 3057 | { | 3065 | { |
147 | 3058 | TRACE_VISIT(); | 3066 | TRACE_VISIT(); |
149 | 3059 | CHK_SINGLE_DECL(hadCopyNSDecl, err::XQST0055); | 3067 | |
150 | 3068 | if (hadCopyNSDecl) | ||
151 | 3069 | RAISE_ERROR_NO_PARAMS(err::XQST0055, loc); | ||
152 | 3070 | |||
153 | 3071 | hadCopyNSDecl = true; | ||
154 | 3072 | |||
155 | 3060 | return no_state; | 3073 | return no_state; |
156 | 3061 | } | 3074 | } |
157 | 3062 | 3075 | ||
158 | @@ -3090,7 +3103,7 @@ | |||
159 | 3090 | } | 3103 | } |
160 | 3091 | 3104 | ||
161 | 3092 | theSctx->add_decimal_format( | 3105 | theSctx->add_decimal_format( |
163 | 3093 | new DecimalFormat( v.is_default, qnameItem, v.param_list, loc ), loc | 3106 | new DecimalFormat(v.is_default, qnameItem, v.param_list, loc), loc |
164 | 3094 | ); | 3107 | ); |
165 | 3095 | 3108 | ||
166 | 3096 | return no_state; | 3109 | return no_state; |
167 | @@ -3126,7 +3139,10 @@ | |||
168 | 3126 | { | 3139 | { |
169 | 3127 | TRACE_VISIT(); | 3140 | TRACE_VISIT(); |
170 | 3128 | 3141 | ||
172 | 3129 | CHK_SINGLE_DECL(hadBUriDecl, err::XQST0032); | 3142 | if (hadBUriDecl) |
173 | 3143 | RAISE_ERROR_NO_PARAMS(err::XQST0032, loc); | ||
174 | 3144 | |||
175 | 3145 | hadBUriDecl = true; | ||
176 | 3130 | 3146 | ||
177 | 3131 | zstring uri(v.get_base_uri()); | 3147 | zstring uri(v.get_base_uri()); |
178 | 3132 | try | 3148 | try |
179 | @@ -3135,8 +3151,8 @@ | |||
180 | 3135 | } | 3151 | } |
181 | 3136 | catch (ZorbaException& e) | 3152 | catch (ZorbaException& e) |
182 | 3137 | { | 3153 | { |
185 | 3138 | e.set_diagnostic( err::XQST0046 ); | 3154 | e.set_diagnostic(err::XQST0046); |
186 | 3139 | set_source( e, loc ); | 3155 | set_source(e, loc); |
187 | 3140 | throw; | 3156 | throw; |
188 | 3141 | } | 3157 | } |
189 | 3142 | return NULL; | 3158 | return NULL; |
190 | @@ -3157,7 +3173,11 @@ | |||
191 | 3157 | { | 3173 | { |
192 | 3158 | TRACE_VISIT(); | 3174 | TRACE_VISIT(); |
193 | 3159 | 3175 | ||
195 | 3160 | CHK_SINGLE_DECL(hadConstrDecl, err::XQST0067); | 3176 | if (hadConstrDecl) |
196 | 3177 | RAISE_ERROR_NO_PARAMS(err::XQST0067, loc); | ||
197 | 3178 | |||
198 | 3179 | hadConstrDecl = true; | ||
199 | 3180 | |||
200 | 3161 | theSctx->set_construction_mode(v.get_mode()); | 3181 | theSctx->set_construction_mode(v.get_mode()); |
201 | 3162 | return NULL; | 3182 | return NULL; |
202 | 3163 | } | 3183 | } |
203 | @@ -3175,7 +3195,11 @@ | |||
204 | 3175 | { | 3195 | { |
205 | 3176 | TRACE_VISIT(); | 3196 | TRACE_VISIT(); |
206 | 3177 | 3197 | ||
208 | 3178 | CHK_SINGLE_DECL (hadBUriDecl, err::XUST0003); | 3198 | if (hadRevalDecl) |
209 | 3199 | RAISE_ERROR_NO_PARAMS(err::XUST0003, loc); | ||
210 | 3200 | |||
211 | 3201 | hadRevalDecl = true; | ||
212 | 3202 | |||
213 | 3179 | theSctx->set_validation_mode(v.get_mode()); | 3203 | theSctx->set_validation_mode(v.get_mode()); |
214 | 3180 | return no_state; | 3204 | return no_state; |
215 | 3181 | } | 3205 | } |
216 | @@ -3198,19 +3222,13 @@ | |||
217 | 3198 | 3222 | ||
218 | 3199 | if (pre == "xml" || pre == "xmlns") | 3223 | if (pre == "xml" || pre == "xmlns") |
219 | 3200 | { | 3224 | { |
225 | 3201 | throw XQUERY_EXCEPTION( | 3225 | RAISE_ERROR(err::XQST0070, loc, |
226 | 3202 | err::XQST0070, | 3226 | ERROR_PARAMS(ZED(XQST0070_ReservedPrefixInDecl_2), pre)); |
222 | 3203 | ERROR_PARAMS( pre, ZED( NoRebindPrefix ) ), | ||
223 | 3204 | ERROR_LOC( loc ) | ||
224 | 3205 | ); | ||
227 | 3206 | } | 3227 | } |
228 | 3207 | else if (uri == XML_NS || uri == XMLNS_NS) | 3228 | else if (uri == XML_NS || uri == XMLNS_NS) |
229 | 3208 | { | 3229 | { |
235 | 3209 | throw XQUERY_EXCEPTION( | 3230 | RAISE_ERROR(err::XQST0070, loc, |
236 | 3210 | err::XQST0070, | 3231 | ERROR_PARAMS(ZED(XQST0070_ReservedURI_23), pre, uri)); |
232 | 3211 | ERROR_PARAMS( uri, ZED( NoBindURI ) ), | ||
233 | 3212 | ERROR_LOC( loc ) | ||
234 | 3213 | ); | ||
237 | 3214 | } | 3232 | } |
238 | 3215 | 3233 | ||
239 | 3216 | theSctx->bind_ns(pre, uri, loc); | 3234 | theSctx->bind_ns(pre, uri, loc); |
240 | @@ -3232,13 +3250,21 @@ | |||
241 | 3232 | { | 3250 | { |
242 | 3233 | TRACE_VISIT(); | 3251 | TRACE_VISIT(); |
243 | 3234 | 3252 | ||
244 | 3253 | zstring uri = v.get_default_namespace(); | ||
245 | 3254 | |||
246 | 3255 | if (uri == XML_NS || uri == XMLNS_NS) | ||
247 | 3256 | { | ||
248 | 3257 | RAISE_ERROR(err::XQST0070, loc, | ||
249 | 3258 | ERROR_PARAMS(ZED(XQST0070_ReservedURI_23), "", uri)); | ||
250 | 3259 | } | ||
251 | 3260 | |||
252 | 3235 | switch (v.get_mode()) | 3261 | switch (v.get_mode()) |
253 | 3236 | { | 3262 | { |
254 | 3237 | case ParseConstants::ns_element_default: | 3263 | case ParseConstants::ns_element_default: |
256 | 3238 | theSctx->set_default_elem_type_ns(v.get_default_namespace(), true, loc); | 3264 | theSctx->set_default_elem_type_ns(uri, true, loc); |
257 | 3239 | break; | 3265 | break; |
258 | 3240 | case ParseConstants::ns_function_default: | 3266 | case ParseConstants::ns_function_default: |
260 | 3241 | theSctx->set_default_function_ns(v.get_default_namespace(), true, loc); | 3267 | theSctx->set_default_function_ns(uri, true, loc); |
261 | 3242 | break; | 3268 | break; |
262 | 3243 | } | 3269 | } |
263 | 3244 | return NULL; | 3270 | return NULL; |
264 | @@ -3553,7 +3579,7 @@ | |||
265 | 3553 | importedNS = mod_ast->get_decl()->get_target_namespace().str(); | 3579 | importedNS = mod_ast->get_decl()->get_target_namespace().str(); |
266 | 3554 | 3580 | ||
267 | 3555 | if (importedNS.empty()) | 3581 | if (importedNS.empty()) |
269 | 3556 | throw XQUERY_EXCEPTION(err::XQST0088, ERROR_LOC(loc)); | 3582 | RAISE_ERROR_NO_PARAMS(err::XQST0088, loc); |
270 | 3557 | 3583 | ||
271 | 3558 | if (importedNS != targetNS) | 3584 | if (importedNS != targetNS) |
272 | 3559 | { | 3585 | { |
273 | @@ -3644,16 +3670,16 @@ | |||
274 | 3644 | } | 3670 | } |
275 | 3645 | 3671 | ||
276 | 3646 | // The namespace prefix specified in a module import must not be xml or xmlns | 3672 | // The namespace prefix specified in a module import must not be xml or xmlns |
279 | 3647 | // [err:XQST0070] | 3673 | if (pfx == "xml" || pfx == "xmlns") |
278 | 3648 | if (!pfx.empty() && (pfx == "xml" || pfx == "xmlns")) | ||
280 | 3649 | { | 3674 | { |
282 | 3650 | RAISE_ERROR(err::XQST0070, loc, ERROR_PARAMS(pfx, ZED(NoRebindPrefix))); | 3675 | RAISE_ERROR(err::XQST0070, loc, |
283 | 3676 | ERROR_PARAMS(ZED(XQST0070_ReservedPrefixInImport_2), pfx)); | ||
284 | 3651 | } | 3677 | } |
285 | 3652 | 3678 | ||
286 | 3653 | // The first URILiteral in a module import must be of nonzero length | 3679 | // The first URILiteral in a module import must be of nonzero length |
287 | 3654 | // [err:XQST0088] | 3680 | // [err:XQST0088] |
288 | 3655 | if (targetNS.empty()) | 3681 | if (targetNS.empty()) |
290 | 3656 | throw XQUERY_EXCEPTION(err::XQST0088, ERROR_LOC(loc)); | 3682 | RAISE_ERROR_NO_PARAMS(err::XQST0088, loc); |
291 | 3657 | 3683 | ||
292 | 3658 | // It is a static error [err:XQST0047] if more than one module import in a | 3684 | // It is a static error [err:XQST0047] if more than one module import in a |
293 | 3659 | // Prolog specifies the same target namespace. Note: by checking this here, | 3685 | // Prolog specifies the same target namespace. Note: by checking this here, |
294 | @@ -5498,20 +5524,14 @@ | |||
295 | 5498 | 5524 | ||
296 | 5499 | if ( !theSctx->is_feature_set(feature::ddl) ) | 5525 | if ( !theSctx->is_feature_set(feature::ddl) ) |
297 | 5500 | { | 5526 | { |
303 | 5501 | throw XQUERY_EXCEPTION( | 5527 | RAISE_ERROR(zerr::ZXQP0050_FEATURE_NOT_AVAILABLE, v.get_location(), |
304 | 5502 | zerr::ZXQP0050_FEATURE_NOT_AVAILABLE, | 5528 | ERROR_PARAMS("data-definition (ddl)")); |
300 | 5503 | ERROR_PARAMS( "data-definition (ddl)" ), | ||
301 | 5504 | ERROR_LOC( v.get_location() ) | ||
302 | 5505 | ); | ||
305 | 5506 | } | 5529 | } |
306 | 5507 | 5530 | ||
307 | 5508 | if (!inLibraryModule()) | 5531 | if (!inLibraryModule()) |
308 | 5509 | { | 5532 | { |
314 | 5510 | throw XQUERY_EXCEPTION( | 5533 | RAISE_ERROR(zerr::ZDST0044_IC_DECL_IN_MAIN_MODULE, loc, |
315 | 5511 | zerr::ZDST0044_IC_DECL_IN_MAIN_MODULE, | 5534 | ERROR_PARAMS(v.getName()->get_qname())); |
311 | 5512 | ERROR_PARAMS( v.getName()->get_qname() ), | ||
312 | 5513 | ERROR_LOC( loc ) | ||
313 | 5514 | ); | ||
316 | 5515 | } | 5535 | } |
317 | 5516 | 5536 | ||
318 | 5517 | push_scope(); | 5537 | push_scope(); |
319 | @@ -6171,11 +6191,8 @@ | |||
320 | 6171 | 6191 | ||
321 | 6172 | if (qnameItem->getNamespace() != theModuleNamespace) | 6192 | if (qnameItem->getNamespace() != theModuleNamespace) |
322 | 6173 | { | 6193 | { |
328 | 6174 | throw XQUERY_EXCEPTION( | 6194 | RAISE_ERROR(zerr::ZDST0048_IC_DECL_IN_FOREIGN_MODULE, loc, |
329 | 6175 | zerr::ZDST0048_IC_DECL_IN_FOREIGN_MODULE, | 6195 | ERROR_PARAMS(qname->get_qname())); |
325 | 6176 | ERROR_PARAMS( qname->get_qname() ), | ||
326 | 6177 | ERROR_LOC( loc ) | ||
327 | 6178 | ); | ||
330 | 6179 | } | 6196 | } |
331 | 6180 | 6197 | ||
332 | 6181 | ValueIC_t vic; | 6198 | ValueIC_t vic; |
333 | @@ -7032,7 +7049,7 @@ | |||
334 | 7032 | expr* domainExpr = pop_nodestack(); | 7049 | expr* domainExpr = pop_nodestack(); |
335 | 7033 | 7050 | ||
336 | 7034 | if (domainExpr->is_updating()) | 7051 | if (domainExpr->is_updating()) |
338 | 7035 | throw XQUERY_EXCEPTION(err::XUST0001, ERROR_LOC(loc)); | 7052 | RAISE_ERROR_NO_PARAMS(err::XUST0001, loc); |
339 | 7036 | 7053 | ||
340 | 7037 | // it's important to insert the debugger before the scope is pushed. | 7054 | // it's important to insert the debugger before the scope is pushed. |
341 | 7038 | // Otherwise, the variable in question would already be in scope for | 7055 | // Otherwise, the variable in question would already be in scope for |
342 | @@ -7136,7 +7153,7 @@ | |||
343 | 7136 | xqtref_t type) | 7153 | xqtref_t type) |
344 | 7137 | { | 7154 | { |
345 | 7138 | if (domainExpr->is_updating()) | 7155 | if (domainExpr->is_updating()) |
347 | 7139 | throw XQUERY_EXCEPTION(err::XUST0001, ERROR_LOC(loc)); | 7156 | RAISE_ERROR_NO_PARAMS(err::XUST0001, loc); |
348 | 7140 | 7157 | ||
349 | 7141 | // it's important to insert the debugger before the scope is pushed. | 7158 | // it's important to insert the debugger before the scope is pushed. |
350 | 7142 | // Otherwise, the variable in question would already be in scope for | 7159 | // Otherwise, the variable in question would already be in scope for |
351 | @@ -7773,7 +7790,7 @@ | |||
352 | 7773 | expr* orderExpr = pop_nodestack(); | 7790 | expr* orderExpr = pop_nodestack(); |
353 | 7774 | 7791 | ||
354 | 7775 | if (orderExpr->is_updating()) | 7792 | if (orderExpr->is_updating()) |
356 | 7776 | throw XQUERY_EXCEPTION(err::XUST0001, ERROR_LOC(loc)); | 7793 | RAISE_ERROR_NO_PARAMS(err::XUST0001, loc); |
357 | 7777 | 7794 | ||
358 | 7778 | orderExpr = wrap_in_atomization(orderExpr); | 7795 | orderExpr = wrap_in_atomization(orderExpr); |
359 | 7779 | 7796 | ||
360 | @@ -7896,7 +7913,7 @@ | |||
361 | 7896 | expr* whereExpr = pop_nodestack(); | 7913 | expr* whereExpr = pop_nodestack(); |
362 | 7897 | 7914 | ||
363 | 7898 | if (whereExpr->is_updating()) | 7915 | if (whereExpr->is_updating()) |
365 | 7899 | throw XQUERY_EXCEPTION(err::XUST0001, ERROR_LOC(loc)); | 7916 | RAISE_ERROR_NO_PARAMS(err::XUST0001, loc); |
366 | 7900 | 7917 | ||
367 | 7901 | whereExpr = wrap_in_bev(whereExpr); | 7918 | whereExpr = wrap_in_bev(whereExpr); |
368 | 7902 | 7919 | ||
369 | @@ -9547,7 +9564,7 @@ | |||
370 | 9547 | 9564 | ||
371 | 9548 | if (v.get_expr() == NULL) | 9565 | if (v.get_expr() == NULL) |
372 | 9549 | { | 9566 | { |
374 | 9550 | throw XQUERY_EXCEPTION( err::XQST0079, ERROR_LOC(loc) ); | 9567 | RAISE_ERROR_NO_PARAMS(err::XQST0079, loc); |
375 | 9551 | } | 9568 | } |
376 | 9552 | 9569 | ||
377 | 9553 | return no_state; | 9570 | return no_state; |
378 | @@ -11309,17 +11326,15 @@ | |||
379 | 11309 | if (theModuleNamespace.empty()) | 11326 | if (theModuleNamespace.empty()) |
380 | 11310 | { | 11327 | { |
381 | 11311 | RAISE_ERROR(err::XPTY0004, loc, | 11328 | RAISE_ERROR(err::XPTY0004, loc, |
383 | 11312 | ERROR_PARAMS(ZED(BadType_23o), | 11329 | ERROR_PARAMS(ZED(XPTY0004_NoVarTypeInMainModule_23), |
384 | 11313 | *declaredType, | 11330 | *declaredType, |
385 | 11314 | ZED(NoTypeInMainModule_4), | ||
386 | 11315 | ve->get_name()->getStringValue())); | 11331 | ve->get_name()->getStringValue())); |
387 | 11316 | } | 11332 | } |
388 | 11317 | else | 11333 | else |
389 | 11318 | { | 11334 | { |
390 | 11319 | RAISE_ERROR(err::XPTY0004, loc, | 11335 | RAISE_ERROR(err::XPTY0004, loc, |
392 | 11320 | ERROR_PARAMS(ZED(BadType_23o), | 11336 | ERROR_PARAMS(ZED(XPTY0004_NoVarTypeInModule_234), |
393 | 11321 | *declaredType, | 11337 | *declaredType, |
394 | 11322 | ZED(NoTypeInModule_45), | ||
395 | 11323 | ve->get_name()->getStringValue(), | 11338 | ve->get_name()->getStringValue(), |
396 | 11324 | theModuleNamespace)); | 11339 | theModuleNamespace)); |
397 | 11325 | } | 11340 | } |
398 | @@ -11329,17 +11344,15 @@ | |||
399 | 11329 | if (theModuleNamespace.empty()) | 11344 | if (theModuleNamespace.empty()) |
400 | 11330 | { | 11345 | { |
401 | 11331 | RAISE_ERROR(err::XQST0036, loc, | 11346 | RAISE_ERROR(err::XQST0036, loc, |
403 | 11332 | ERROR_PARAMS(ZED(BadType_23o), | 11347 | ERROR_PARAMS(ZED(XQST0036_NoVarTypeInMainModule_23), |
404 | 11333 | *declaredType, | 11348 | *declaredType, |
405 | 11334 | ZED(NoTypeInMainModule_4), | ||
406 | 11335 | ve->get_name()->getStringValue())); | 11349 | ve->get_name()->getStringValue())); |
407 | 11336 | } | 11350 | } |
408 | 11337 | else | 11351 | else |
409 | 11338 | { | 11352 | { |
410 | 11339 | RAISE_ERROR(err::XQST0036, loc, | 11353 | RAISE_ERROR(err::XQST0036, loc, |
412 | 11340 | ERROR_PARAMS(ZED(BadType_23o), | 11354 | ERROR_PARAMS(ZED(XQST0036_NoVarTypeInModule_234), |
413 | 11341 | *declaredType, | 11355 | *declaredType, |
414 | 11342 | ZED(NoTypeInModule_45), | ||
415 | 11343 | ve->get_name()->getStringValue(), | 11356 | ve->get_name()->getStringValue(), |
416 | 11344 | theModuleNamespace)); | 11357 | theModuleNamespace)); |
417 | 11345 | } | 11358 | } |
418 | @@ -11566,17 +11579,15 @@ | |||
419 | 11566 | if (theModuleNamespace.empty()) | 11579 | if (theModuleNamespace.empty()) |
420 | 11567 | { | 11580 | { |
421 | 11568 | RAISE_ERROR(err::XQST0036, loc, | 11581 | RAISE_ERROR(err::XQST0036, loc, |
423 | 11569 | ERROR_PARAMS(ZED(BadType_23o), | 11582 | ERROR_PARAMS(ZED(XQST0036_NoRetTypeInMainModule_23), |
424 | 11570 | *retType, | 11583 | *retType, |
425 | 11571 | ZED(NoTypeInMainModule_4), | ||
426 | 11572 | f->getName()->getStringValue())); | 11584 | f->getName()->getStringValue())); |
427 | 11573 | } | 11585 | } |
428 | 11574 | else | 11586 | else |
429 | 11575 | { | 11587 | { |
430 | 11576 | RAISE_ERROR(err::XQST0036, loc, | 11588 | RAISE_ERROR(err::XQST0036, loc, |
432 | 11577 | ERROR_PARAMS(ZED(BadType_23o), | 11589 | ERROR_PARAMS(ZED(XQST0036_NoRetTypeInModule_234), |
433 | 11578 | *retType, | 11590 | *retType, |
434 | 11579 | ZED(NoTypeInModule_45), | ||
435 | 11580 | f->getName()->getStringValue(), | 11591 | f->getName()->getStringValue(), |
436 | 11581 | theModuleNamespace)); | 11592 | theModuleNamespace)); |
437 | 11582 | } | 11593 | } |
438 | @@ -11594,17 +11605,15 @@ | |||
439 | 11594 | if (theModuleNamespace.empty()) | 11605 | if (theModuleNamespace.empty()) |
440 | 11595 | { | 11606 | { |
441 | 11596 | RAISE_ERROR(err::XQST0036, loc, | 11607 | RAISE_ERROR(err::XQST0036, loc, |
443 | 11597 | ERROR_PARAMS(ZED(BadType_23o), | 11608 | ERROR_PARAMS(ZED(XQST0036_NoParamTypeInMainModule_23), |
444 | 11598 | *type, | 11609 | *type, |
445 | 11599 | ZED(NoTypeInMainModule_4), | ||
446 | 11600 | f->getName()->getStringValue())); | 11610 | f->getName()->getStringValue())); |
447 | 11601 | } | 11611 | } |
448 | 11602 | else | 11612 | else |
449 | 11603 | { | 11613 | { |
450 | 11604 | RAISE_ERROR(err::XQST0036, loc, | 11614 | RAISE_ERROR(err::XQST0036, loc, |
452 | 11605 | ERROR_PARAMS(ZED(BadType_23o), | 11615 | ERROR_PARAMS(ZED(XQST0036_NoParamTypeInModule_234), |
453 | 11606 | *retType, | 11616 | *retType, |
454 | 11607 | ZED(NoTypeInModule_45), | ||
455 | 11608 | f->getName()->getStringValue(), | 11617 | f->getName()->getStringValue(), |
456 | 11609 | theModuleNamespace)); | 11618 | theModuleNamespace)); |
457 | 11610 | } | 11619 | } |
458 | @@ -13467,9 +13476,10 @@ | |||
459 | 13467 | { | 13476 | { |
460 | 13468 | prefix = qname->get_localname(); | 13477 | prefix = qname->get_localname(); |
461 | 13469 | 13478 | ||
465 | 13470 | if (ZSTREQ(prefix, "xmlns")) | 13479 | if (prefix == "xmlns") |
466 | 13471 | RAISE_ERROR(err::XQST0070, loc, | 13480 | { |
467 | 13472 | ERROR_PARAMS(prefix, ZED(NoRebindPrefix))); | 13481 | RAISE_ERROR(err::XQST0070, loc, ERROR_PARAMS(ZED(XQST0070_xmlnsInAttrDecl))); |
468 | 13482 | } | ||
469 | 13473 | } | 13483 | } |
470 | 13474 | 13484 | ||
471 | 13475 | const_expr* constValueExpr = dynamic_cast<const_expr*>(valueExpr); | 13485 | const_expr* constValueExpr = dynamic_cast<const_expr*>(valueExpr); |
472 | @@ -13499,10 +13509,11 @@ | |||
473 | 13499 | foExpr2->get_func()->getKind() == FunctionConsts::OP_ENCLOSED_1 && | 13509 | foExpr2->get_func()->getKind() == FunctionConsts::OP_ENCLOSED_1 && |
474 | 13500 | (qname->get_qname() == "xmlns" || qname->get_prefix() == "xmlns")) | 13510 | (qname->get_qname() == "xmlns" || qname->get_prefix() == "xmlns")) |
475 | 13501 | { | 13511 | { |
477 | 13502 | throw XQUERY_EXCEPTION(err::XQST0022, ERROR_LOC(loc)); | 13512 | RAISE_ERROR_NO_PARAMS(err::XQST0022, loc); |
478 | 13503 | } | 13513 | } |
479 | 13504 | } | 13514 | } |
480 | 13505 | } | 13515 | } |
481 | 13516 | |||
482 | 13506 | have_uri = true; | 13517 | have_uri = true; |
483 | 13507 | } | 13518 | } |
484 | 13508 | 13519 | ||
485 | @@ -13511,13 +13522,14 @@ | |||
486 | 13511 | if ((ZSTREQ(prefix, "xml") && !ZSTREQ(uri, XML_NS))) | 13522 | if ((ZSTREQ(prefix, "xml") && !ZSTREQ(uri, XML_NS))) |
487 | 13512 | { | 13523 | { |
488 | 13513 | RAISE_ERROR(err::XQST0070, loc, | 13524 | RAISE_ERROR(err::XQST0070, loc, |
490 | 13514 | ERROR_PARAMS(prefix, ZED(NoRebindPrefix))); | 13525 | ERROR_PARAMS(ZED(XQST0070_ReservedPrefix_23), prefix, uri)); |
491 | 13515 | } | 13526 | } |
492 | 13516 | 13527 | ||
493 | 13517 | if ((ZSTREQ(uri, XML_NS) && !ZSTREQ(prefix, "xml")) || | 13528 | if ((ZSTREQ(uri, XML_NS) && !ZSTREQ(prefix, "xml")) || |
494 | 13518 | ZSTREQ(uri, XMLNS_NS)) | 13529 | ZSTREQ(uri, XMLNS_NS)) |
495 | 13519 | { | 13530 | { |
497 | 13520 | RAISE_ERROR(err::XQST0070, loc, ERROR_PARAMS(uri, ZED(NoBindURI))); | 13531 | RAISE_ERROR(err::XQST0070, loc, |
498 | 13532 | ERROR_PARAMS(ZED(XQST0070_ReservedURI_23), prefix, uri)); | ||
499 | 13521 | } | 13533 | } |
500 | 13522 | 13534 | ||
501 | 13523 | URI parsedUri(uri); | 13535 | URI parsedUri(uri); |
502 | @@ -13533,7 +13545,7 @@ | |||
503 | 13533 | if (ZSTREQ(prefix, "xml")) | 13545 | if (ZSTREQ(prefix, "xml")) |
504 | 13534 | { | 13546 | { |
505 | 13535 | RAISE_ERROR(err::XQST0070, loc, | 13547 | RAISE_ERROR(err::XQST0070, loc, |
507 | 13536 | ERROR_PARAMS(prefix, ZED(NoRebindPrefix))); | 13548 | ERROR_PARAMS(ZED(XQST0070_ReservedPrefix_23), prefix, "")); |
508 | 13537 | } | 13549 | } |
509 | 13538 | 13550 | ||
510 | 13539 | // unbind the prefix | 13551 | // unbind the prefix |
511 | @@ -13546,7 +13558,7 @@ | |||
512 | 13546 | } | 13558 | } |
513 | 13547 | else | 13559 | else |
514 | 13548 | { | 13560 | { |
516 | 13549 | throw XQUERY_EXCEPTION(err::XQST0022, ERROR_LOC(loc)); | 13561 | RAISE_ERROR_NO_PARAMS(err::XQST0022, loc); |
517 | 13550 | } | 13562 | } |
518 | 13551 | } | 13563 | } |
519 | 13552 | // Plain direct attribute | 13564 | // Plain direct attribute |
520 | @@ -14929,17 +14941,17 @@ | |||
521 | 14929 | // whose PITarget is equal to fn:normalize-space(N). If fn:normalize-space(N) | 14941 | // whose PITarget is equal to fn:normalize-space(N). If fn:normalize-space(N) |
522 | 14930 | // is not in the lexical space of NCName, a type error is raised [err:XPTY0004] | 14942 | // is not in the lexical space of NCName, a type error is raised [err:XPTY0004] |
523 | 14931 | 14943 | ||
526 | 14932 | zstring lNormalizedTarget; | 14944 | zstring normalizedTarget; |
527 | 14933 | ascii::normalize_space(target, &lNormalizedTarget); | 14945 | ascii::normalize_space(target, &normalizedTarget); |
528 | 14934 | 14946 | ||
530 | 14935 | if (!GenericCast::castableToNCName(lNormalizedTarget)) | 14947 | if (!GenericCast::castableToNCName(normalizedTarget)) |
531 | 14936 | { | 14948 | { |
532 | 14937 | RAISE_ERROR(err::XPTY0004, loc, | 14949 | RAISE_ERROR(err::XPTY0004, loc, |
534 | 14938 | ERROR_PARAMS(ZED(BadType_23o), lNormalizedTarget, ZED(NoCastTo_45o), "NCName")); | 14950 | ERROR_PARAMS(ZED(XPTY0004_ValueNoCastTo_23), normalizedTarget, "xs:NCName")); |
535 | 14939 | } | 14951 | } |
536 | 14940 | 14952 | ||
537 | 14941 | // bugfix (see above); pass normalized string instead of original target | 14953 | // bugfix (see above); pass normalized string instead of original target |
539 | 14942 | GENV_ITEMFACTORY->createQName(qname, NULL, NULL, lNormalizedTarget.c_str()); | 14954 | GENV_ITEMFACTORY->createQName(qname, NULL, NULL, normalizedTarget.c_str()); |
540 | 14943 | } | 14955 | } |
541 | 14944 | 14956 | ||
542 | 14945 | if (axisExpr != NULL) | 14957 | if (axisExpr != NULL) |
543 | @@ -15472,7 +15484,7 @@ | |||
544 | 15472 | expr* sourceExpr = pop_nodestack(); | 15484 | expr* sourceExpr = pop_nodestack(); |
545 | 15473 | 15485 | ||
546 | 15474 | if (sourceExpr->is_updating()) | 15486 | if (sourceExpr->is_updating()) |
548 | 15475 | throw XQUERY_EXCEPTION(err::XUST0001, ERROR_LOC(loc)); | 15487 | RAISE_ERROR_NO_PARAMS(err::XUST0001, loc); |
549 | 15476 | 15488 | ||
550 | 15477 | push_scope(); | 15489 | push_scope(); |
551 | 15478 | 15490 | ||
552 | @@ -15592,9 +15604,7 @@ | |||
553 | 15592 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); | 15604 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); |
554 | 15593 | ZORBA_ASSERT( mo ); | 15605 | ZORBA_ASSERT( mo ); |
555 | 15594 | if ( mo->get_case_option() ) | 15606 | if ( mo->get_case_option() ) |
559 | 15595 | throw XQUERY_EXCEPTION( | 15607 | RAISE_ERROR(err::FTST0019, loc, ERROR_PARAMS("case")); |
557 | 15596 | err::FTST0019, ERROR_PARAMS( "case" ), ERROR_LOC( loc ) | ||
558 | 15597 | ); | ||
560 | 15598 | mo->set_case_option( new ftcase_option( loc, v.get_mode() ) ); | 15608 | mo->set_case_option( new ftcase_option( loc, v.get_mode() ) ); |
561 | 15599 | #endif /* ZORBA_NO_FULL_TEXT */ | 15609 | #endif /* ZORBA_NO_FULL_TEXT */ |
562 | 15600 | } | 15610 | } |
563 | @@ -15604,9 +15614,7 @@ | |||
564 | 15604 | { | 15614 | { |
565 | 15605 | TRACE_VISIT (); | 15615 | TRACE_VISIT (); |
566 | 15606 | #ifdef ZORBA_NO_FULL_TEXT | 15616 | #ifdef ZORBA_NO_FULL_TEXT |
570 | 15607 | throw XQUERY_EXCEPTION( | 15617 | RAISE_ERROR(err::XPST0003, loc, ERROR_PARAMS(ZED(FullTextNotEnabled))); |
568 | 15608 | err::XPST0003, ERROR_PARAMS( ZED( FullTextNotEnabled ) ), ERROR_LOC( loc ) | ||
569 | 15609 | ); | ||
571 | 15610 | #endif /* ZORBA_NO_FULL_TEXT */ | 15618 | #endif /* ZORBA_NO_FULL_TEXT */ |
572 | 15611 | return no_state; | 15619 | return no_state; |
573 | 15612 | } | 15620 | } |
574 | @@ -15656,9 +15664,7 @@ | |||
575 | 15656 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); | 15664 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); |
576 | 15657 | ZORBA_ASSERT( mo ); | 15665 | ZORBA_ASSERT( mo ); |
577 | 15658 | if ( mo->get_diacritics_option() ) | 15666 | if ( mo->get_diacritics_option() ) |
581 | 15659 | throw XQUERY_EXCEPTION( | 15667 | RAISE_ERROR(err::FTST0019, loc, ERROR_PARAMS("diacriticics")); |
579 | 15660 | err::FTST0019, ERROR_PARAMS( "diacriticics" ), ERROR_LOC( loc ) | ||
580 | 15661 | ); | ||
582 | 15662 | mo->set_diacritics_option( new ftdiacritics_option( loc, v.get_mode() ) ); | 15668 | mo->set_diacritics_option( new ftdiacritics_option( loc, v.get_mode() ) ); |
583 | 15663 | #endif /* ZORBA_NO_FULL_TEXT */ | 15669 | #endif /* ZORBA_NO_FULL_TEXT */ |
584 | 15664 | } | 15670 | } |
585 | @@ -15711,7 +15717,7 @@ | |||
586 | 15711 | if ( s ) | 15717 | if ( s ) |
587 | 15712 | pop_ftstack(); | 15718 | pop_ftstack(); |
588 | 15713 | else | 15719 | else |
590 | 15714 | throw XQUERY_EXCEPTION( err::XQST0079, ERROR_LOC( loc ) ); | 15720 | RAISE_ERROR_NO_PARAMS(err::XQST0079, loc); |
591 | 15715 | push_ftstack( new ftextension_selection( loc, v.get_pragma_list(), s ) ); | 15721 | push_ftstack( new ftextension_selection( loc, v.get_pragma_list(), s ) ); |
592 | 15716 | #endif /* ZORBA_NO_FULL_TEXT */ | 15722 | #endif /* ZORBA_NO_FULL_TEXT */ |
593 | 15717 | } | 15723 | } |
594 | @@ -15745,9 +15751,7 @@ | |||
595 | 15745 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); | 15751 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); |
596 | 15746 | ZORBA_ASSERT( mo ); | 15752 | ZORBA_ASSERT( mo ); |
597 | 15747 | if ( mo->get_language_option() ) | 15753 | if ( mo->get_language_option() ) |
601 | 15748 | throw XQUERY_EXCEPTION( | 15754 | RAISE_ERROR(err::FTST0019, loc, ERROR_PARAMS("language")); |
599 | 15749 | err::FTST0019, ERROR_PARAMS( "language" ), ERROR_LOC( loc ) | ||
600 | 15750 | ); | ||
602 | 15751 | mo->set_language_option( new ftlanguage_option( loc, v.get_language() ) ); | 15755 | mo->set_language_option( new ftlanguage_option( loc, v.get_language() ) ); |
603 | 15752 | #endif /* ZORBA_NO_FULL_TEXT */ | 15756 | #endif /* ZORBA_NO_FULL_TEXT */ |
604 | 15753 | } | 15757 | } |
605 | @@ -15936,9 +15940,7 @@ | |||
606 | 15936 | 15940 | ||
607 | 15937 | void *begin_visit (const FTScoreVar& v) { | 15941 | void *begin_visit (const FTScoreVar& v) { |
608 | 15938 | TRACE_VISIT (); | 15942 | TRACE_VISIT (); |
612 | 15939 | throw XQUERY_EXCEPTION( | 15943 | RAISE_ERROR(zerr::ZXQP0004_NOT_IMPLEMENTED, loc, ERROR_PARAMS("score")); |
610 | 15940 | zerr::ZXQP0004_NOT_IMPLEMENTED, ERROR_PARAMS( "score" ), ERROR_LOC( loc ) | ||
611 | 15941 | ); | ||
613 | 15942 | } | 15944 | } |
614 | 15943 | 15945 | ||
615 | 15944 | void end_visit (const FTScoreVar& v, void* /*visit_state*/) { | 15946 | void end_visit (const FTScoreVar& v, void* /*visit_state*/) { |
616 | @@ -15984,9 +15986,7 @@ | |||
617 | 15984 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); | 15986 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); |
618 | 15985 | ZORBA_ASSERT( mo ); | 15987 | ZORBA_ASSERT( mo ); |
619 | 15986 | if ( mo->get_stem_option() ) | 15988 | if ( mo->get_stem_option() ) |
623 | 15987 | throw XQUERY_EXCEPTION( | 15989 | RAISE_ERROR(err::FTST0019, loc, ERROR_PARAMS("stem")); |
621 | 15988 | err::FTST0019, ERROR_PARAMS( "stem" ), ERROR_LOC( loc ) | ||
622 | 15989 | ); | ||
624 | 15990 | mo->set_stem_option( new ftstem_option( loc, v.get_mode() ) ); | 15990 | mo->set_stem_option( new ftstem_option( loc, v.get_mode() ) ); |
625 | 15991 | #endif /* ZORBA_NO_FULL_TEXT */ | 15991 | #endif /* ZORBA_NO_FULL_TEXT */ |
626 | 15992 | } | 15992 | } |
627 | @@ -16049,9 +16049,7 @@ | |||
628 | 16049 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); | 16049 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); |
629 | 16050 | ZORBA_ASSERT( mo ); | 16050 | ZORBA_ASSERT( mo ); |
630 | 16051 | if ( mo->get_stop_word_option() ) | 16051 | if ( mo->get_stop_word_option() ) |
634 | 16052 | throw XQUERY_EXCEPTION( | 16052 | RAISE_ERROR(err::FTST0019, loc, ERROR_PARAMS("stop words")); |
632 | 16053 | err::FTST0019, ERROR_PARAMS( "stop words" ), ERROR_LOC( loc ) | ||
633 | 16054 | ); | ||
635 | 16055 | ftstop_word_option *const sw = | 16053 | ftstop_word_option *const sw = |
636 | 16056 | new ftstop_word_option( loc, stop_words, v.get_mode() ); | 16054 | new ftstop_word_option( loc, stop_words, v.get_mode() ); |
637 | 16057 | mo->set_stop_word_option( sw ); | 16055 | mo->set_stop_word_option( sw ); |
638 | @@ -16073,9 +16071,7 @@ | |||
639 | 16073 | theSctx->resolve_uri( uri, internal::EntityData::THESAURUS, error_msg ) | 16071 | theSctx->resolve_uri( uri, internal::EntityData::THESAURUS, error_msg ) |
640 | 16074 | ); | 16072 | ); |
641 | 16075 | if ( !rsrc.get() ) | 16073 | if ( !rsrc.get() ) |
645 | 16076 | throw XQUERY_EXCEPTION( | 16074 | RAISE_ERROR(err::FTST0018, loc, ERROR_PARAMS( uri )); |
643 | 16077 | err::FTST0018, ERROR_PARAMS( uri ), ERROR_LOC( loc ) | ||
644 | 16078 | ); | ||
646 | 16079 | 16075 | ||
647 | 16080 | ftrange *levels; | 16076 | ftrange *levels; |
648 | 16081 | if ( v.get_levels() ) { | 16077 | if ( v.get_levels() ) { |
649 | @@ -16115,9 +16111,7 @@ | |||
650 | 16115 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); | 16111 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); |
651 | 16116 | ZORBA_ASSERT( mo ); | 16112 | ZORBA_ASSERT( mo ); |
652 | 16117 | if ( mo->get_thesaurus_option() ) | 16113 | if ( mo->get_thesaurus_option() ) |
656 | 16118 | throw XQUERY_EXCEPTION( | 16114 | RAISE_ERROR(err::FTST0019, loc, ERROR_PARAMS( "thesaurus" )); |
654 | 16119 | err::FTST0019, ERROR_PARAMS( "thesaurus" ), ERROR_LOC( loc ) | ||
655 | 16120 | ); | ||
657 | 16121 | ftthesaurus_option *const t = | 16115 | ftthesaurus_option *const t = |
658 | 16122 | new ftthesaurus_option( loc, default_tid, list, v.no_thesaurus() ); | 16116 | new ftthesaurus_option( loc, default_tid, list, v.no_thesaurus() ); |
659 | 16123 | mo->set_thesaurus_option( t ); | 16117 | mo->set_thesaurus_option( t ); |
660 | @@ -16188,9 +16182,7 @@ | |||
661 | 16188 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); | 16182 | ftmatch_options *const mo = dynamic_cast<ftmatch_options*>( top_ftstack() ); |
662 | 16189 | ZORBA_ASSERT( mo ); | 16183 | ZORBA_ASSERT( mo ); |
663 | 16190 | if ( mo->get_wild_card_option() ) | 16184 | if ( mo->get_wild_card_option() ) |
667 | 16191 | throw XQUERY_EXCEPTION( | 16185 | RAISE_ERROR(err::FTST0019, loc, ERROR_PARAMS( "wildcards" )); |
665 | 16192 | err::FTST0019, ERROR_PARAMS( "wildcards" ), ERROR_LOC( loc ) | ||
666 | 16193 | ); | ||
668 | 16194 | mo->set_wild_card_option( new ftwild_card_option( loc, v.get_mode() ) ); | 16186 | mo->set_wild_card_option( new ftwild_card_option( loc, v.get_mode() ) ); |
669 | 16195 | #endif /* ZORBA_NO_FULL_TEXT */ | 16187 | #endif /* ZORBA_NO_FULL_TEXT */ |
670 | 16196 | } | 16188 | } |
671 | 16197 | 16189 | ||
672 | === modified file 'src/diagnostics/diagnostic_en.xml' | |||
673 | --- src/diagnostics/diagnostic_en.xml 2013-06-19 20:05:45 +0000 | |||
674 | +++ src/diagnostics/diagnostic_en.xml 2013-06-20 10:12:27 +0000 | |||
675 | @@ -304,8 +304,20 @@ | |||
676 | 304 | <value>atomization of grouping variable produces more than one item</value> | 304 | <value>atomization of grouping variable produces more than one item</value> |
677 | 305 | </entry> | 305 | </entry> |
678 | 306 | 306 | ||
681 | 307 | <entry key="PiTarget_3"> | 307 | <entry key="NoVarTypeInMainModule_23"> |
682 | 308 | <value>$3: type of processing instruction target is not xs:NCName, or xs:string, or xs:untypedAtomic</value> | 308 | <value>"$2": type of variable "$3" is not among the in-scope types of the main module</value> |
683 | 309 | </entry> | ||
684 | 310 | |||
685 | 311 | <entry key="NoVarTypeInModule_234"> | ||
686 | 312 | <value>"$2": type of variable "$3" is not among the in-scope types of module "$4"</value> | ||
687 | 313 | </entry> | ||
688 | 314 | |||
689 | 315 | <entry key="ValueNoCastTo_23"> | ||
690 | 316 | <value>$2: value can not be cast to type $3</value> | ||
691 | 317 | </entry> | ||
692 | 318 | |||
693 | 319 | <entry key="PiTarget_2"> | ||
694 | 320 | <value>$2: type of processing instruction target is not xs:NCName, or xs:string, or xs:untypedAtomic</value> | ||
695 | 309 | </entry> | 321 | </entry> |
696 | 310 | </diagnostic> | 322 | </diagnostic> |
697 | 311 | 323 | ||
698 | @@ -485,6 +497,31 @@ | |||
699 | 485 | referenced in the importing module. | 497 | referenced in the importing module. |
700 | 486 | </comment> | 498 | </comment> |
701 | 487 | <value>$1</value> | 499 | <value>$1</value> |
702 | 500 | |||
703 | 501 | <entry key="NoVarTypeInMainModule_23"> | ||
704 | 502 | <value>"$2": type of variable "$3" is not among the in-scope types of the main module</value> | ||
705 | 503 | </entry> | ||
706 | 504 | |||
707 | 505 | <entry key="NoVarTypeInModule_234"> | ||
708 | 506 | <value>"$2": type of variable "$3" is not among the in-scope types of module "$4"</value> | ||
709 | 507 | </entry> | ||
710 | 508 | |||
711 | 509 | <entry key="NoRetTypeInMainModule_23"> | ||
712 | 510 | <value>"$2": return type of function "$3" is not among the in-scope types of the main module</value> | ||
713 | 511 | </entry> | ||
714 | 512 | |||
715 | 513 | <entry key="NoRetTypeInModule_234"> | ||
716 | 514 | <value>"$2": return type of function "$3" is not among the in-scope types of module "$4"</value> | ||
717 | 515 | </entry> | ||
718 | 516 | |||
719 | 517 | <entry key="NoParamTypeInMainModule_23"> | ||
720 | 518 | <value>"$2": parameter type of function "$3" is not among the in-scope types of the main module</value> | ||
721 | 519 | </entry> | ||
722 | 520 | |||
723 | 521 | <entry key="NoParamTypeInModule_234"> | ||
724 | 522 | <value>"$2": parameter type of function "$3" is not among the in-scope types of module "$4"</value> | ||
725 | 523 | </entry> | ||
726 | 524 | |||
727 | 488 | </diagnostic> | 525 | </diagnostic> |
728 | 489 | 526 | ||
729 | 490 | <diagnostic code="XQST0038"> | 527 | <diagnostic code="XQST0038"> |
730 | @@ -588,7 +625,7 @@ | |||
731 | 588 | It is a static error if a schema import binds a namespace prefix but | 625 | It is a static error if a schema import binds a namespace prefix but |
732 | 589 | does not specify a target namespace other than a zero-length string. | 626 | does not specify a target namespace other than a zero-length string. |
733 | 590 | </comment> | 627 | </comment> |
735 | 591 | <value>empty target namespace</value> | 628 | <value>schema import with empty target namespace</value> |
736 | 592 | </diagnostic> | 629 | </diagnostic> |
737 | 593 | 630 | ||
738 | 594 | <diagnostic code="XQST0058"> | 631 | <diagnostic code="XQST0058"> |
739 | @@ -596,7 +633,7 @@ | |||
740 | 596 | It is a static error if multiple schema imports specify the same target | 633 | It is a static error if multiple schema imports specify the same target |
741 | 597 | namespace. | 634 | namespace. |
742 | 598 | </comment> | 635 | </comment> |
744 | 599 | <value>"$1": duplicate target namespace</value> | 636 | <value>duplicate import of schema with target namespace $1</value> |
745 | 600 | </diagnostic> | 637 | </diagnostic> |
746 | 601 | 638 | ||
747 | 602 | <diagnostic code="XQST0059"> | 639 | <diagnostic code="XQST0059"> |
748 | @@ -627,7 +664,7 @@ | |||
749 | 627 | A static error is raised if a Prolog contains more than one ordering mode | 664 | A static error is raised if a Prolog contains more than one ordering mode |
750 | 628 | declaration. | 665 | declaration. |
751 | 629 | </comment> | 666 | </comment> |
753 | 630 | <value>multiple ordering mode declaraions</value> | 667 | <value>multiple ordering mode declarations</value> |
754 | 631 | </diagnostic> | 668 | </diagnostic> |
755 | 632 | 669 | ||
756 | 633 | <diagnostic code="XQST0066"> | 670 | <diagnostic code="XQST0066"> |
757 | @@ -676,7 +713,32 @@ | |||
758 | 676 | - A prefix other than \c xmlns is bound to the namespace URI | 713 | - A prefix other than \c xmlns is bound to the namespace URI |
759 | 677 | <code>http://www.w3.org/2000/xmlns/</code>. | 714 | <code>http://www.w3.org/2000/xmlns/</code>. |
760 | 678 | </comment> | 715 | </comment> |
762 | 679 | <value>"$1": $2</value> | 716 | <value>$1</value> |
763 | 717 | |||
764 | 718 | <entry key="ReservedPrefixInDecl_2"> | ||
765 | 719 | <value>"$2": reserved prefix can not appear in namespace declaration</value> | ||
766 | 720 | </entry> | ||
767 | 721 | |||
768 | 722 | <entry key="ReservedPrefixInModule_2"> | ||
769 | 723 | <value>"$2": reserved prefix can not appear in module declaration</value> | ||
770 | 724 | </entry> | ||
771 | 725 | |||
772 | 726 | <entry key="ReservedPrefixInImport_2"> | ||
773 | 727 | <value>"$2": reserved prefix can not appear in schema or module import</value> | ||
774 | 728 | </entry> | ||
775 | 729 | |||
776 | 730 | <entry key="xmlnsInAttrDecl"> | ||
777 | 731 | <value>"xmlns" prefix can not be bound in namespace declaration attribute</value> | ||
778 | 732 | </entry> | ||
779 | 733 | |||
780 | 734 | <entry key="ReservedPrefix_23"> | ||
781 | 735 | <value>"$2": can not rebind reserved prefix to namespace URI "$3"</value> | ||
782 | 736 | </entry> | ||
783 | 737 | |||
784 | 738 | <entry key="ReservedURI_23"> | ||
785 | 739 | <value>"$2": can not bind prefix to reserved namespace URI "$3"</value> | ||
786 | 740 | </entry> | ||
787 | 741 | |||
788 | 680 | </diagnostic> | 742 | </diagnostic> |
789 | 681 | 743 | ||
790 | 682 | <diagnostic code="XQST0071"> | 744 | <diagnostic code="XQST0071"> |
791 | @@ -727,7 +789,7 @@ | |||
792 | 727 | It is a static error if the literal that specifies the target namespace | 789 | It is a static error if the literal that specifies the target namespace |
793 | 728 | in a module import or a module declaration is of zero length. | 790 | in a module import or a module declaration is of zero length. |
794 | 729 | </comment> | 791 | </comment> |
796 | 730 | <value>empty target namespace literal</value> | 792 | <value>empty target namespace in module import or module declaration</value> |
797 | 731 | </diagnostic> | 793 | </diagnostic> |
798 | 732 | 794 | ||
799 | 733 | <diagnostic code="XQST0089"> | 795 | <diagnostic code="XQST0089"> |
800 | @@ -3904,10 +3966,6 @@ | |||
801 | 3904 | <value>could not parse function arity (maybe it's too large)</value> | 3966 | <value>could not parse function arity (maybe it's too large)</value> |
802 | 3905 | </entry> | 3967 | </entry> |
803 | 3906 | 3968 | ||
804 | 3907 | <entry key="NoRebindPrefix"> | ||
805 | 3908 | <value>can not rebind predefined prefix</value> | ||
806 | 3909 | </entry> | ||
807 | 3910 | |||
808 | 3911 | <entry key="NoRegisteredSerializationCallback_2"> | 3969 | <entry key="NoRegisteredSerializationCallback_2"> |
809 | 3912 | <value>external module "$2" not available using registered SerializationCallback</value> | 3970 | <value>external module "$2" not available using registered SerializationCallback</value> |
810 | 3913 | </entry> | 3971 | </entry> |
811 | @@ -3976,14 +4034,6 @@ | |||
812 | 3976 | <value>"\\$3": multi-character and category escapes not permitted in character range</value> | 4034 | <value>"\\$3": multi-character and category escapes not permitted in character range</value> |
813 | 3977 | </entry> | 4035 | </entry> |
814 | 3978 | 4036 | ||
815 | 3979 | <entry key="NoTypeInMainModule_4"> | ||
816 | 3980 | <value>type of variable "$4" is not among the in-scope types of the main module</value> | ||
817 | 3981 | </entry> | ||
818 | 3982 | |||
819 | 3983 | <entry key="NoTypeInModule_45"> | ||
820 | 3984 | <value>type of variable "$4" is not among the in-scope types module "$5"</value> | ||
821 | 3985 | </entry> | ||
822 | 3986 | |||
823 | 3987 | <entry key="NoURIAuthority"> | 4037 | <entry key="NoURIAuthority"> |
824 | 3988 | <value>no authority</value> | 4038 | <value>no authority</value> |
825 | 3989 | </entry> | 4039 | </entry> |
826 | 3990 | 4040 | ||
827 | === modified file 'src/diagnostics/pregenerated/dict_en.cpp' | |||
828 | --- src/diagnostics/pregenerated/dict_en.cpp 2013-06-19 20:05:45 +0000 | |||
829 | +++ src/diagnostics/pregenerated/dict_en.cpp 2013-06-20 10:12:27 +0000 | |||
830 | @@ -190,22 +190,22 @@ | |||
831 | 190 | { "XQST0052", "\"$1\": not defined as simple type" }, | 190 | { "XQST0052", "\"$1\": not defined as simple type" }, |
832 | 191 | { "XQST0054", "${\"1\": }variable must not depend on itself" }, | 191 | { "XQST0054", "${\"1\": }variable must not depend on itself" }, |
833 | 192 | { "XQST0055", "multiple copy-namespaces declarations" }, | 192 | { "XQST0055", "multiple copy-namespaces declarations" }, |
836 | 193 | { "XQST0057", "empty target namespace" }, | 193 | { "XQST0057", "schema import with empty target namespace" }, |
837 | 194 | { "XQST0058", "\"$1\": duplicate target namespace" }, | 194 | { "XQST0058", "duplicate import of schema with target namespace $1" }, |
838 | 195 | { "XQST0059", "$1" }, | 195 | { "XQST0059", "$1" }, |
839 | 196 | { "XQST0060", "\"$1\": function name has a null namespace URI" }, | 196 | { "XQST0060", "\"$1\": function name has a null namespace URI" }, |
841 | 197 | { "XQST0065", "multiple ordering mode declaraions" }, | 197 | { "XQST0065", "multiple ordering mode declarations" }, |
842 | 198 | { "XQST0066", "multiple element/type/function namespace declarations" }, | 198 | { "XQST0066", "multiple element/type/function namespace declarations" }, |
843 | 199 | { "XQST0067", "multiple construction declarations" }, | 199 | { "XQST0067", "multiple construction declarations" }, |
844 | 200 | { "XQST0068", "multiple boundary-space declarations" }, | 200 | { "XQST0068", "multiple boundary-space declarations" }, |
845 | 201 | { "XQST0069", "multiple empty order declarations" }, | 201 | { "XQST0069", "multiple empty order declarations" }, |
847 | 202 | { "XQST0070", "\"$1\": $2" }, | 202 | { "XQST0070", "$1" }, |
848 | 203 | { "XQST0071", "\"$1\": duplicate namespace declaration attribute" }, | 203 | { "XQST0071", "\"$1\": duplicate namespace declaration attribute" }, |
849 | 204 | { "XQST0076", "\"$1\": unknown collation" }, | 204 | { "XQST0076", "\"$1\": unknown collation" }, |
850 | 205 | { "XQST0079", "unknown pragma or empty expression" }, | 205 | { "XQST0079", "unknown pragma or empty expression" }, |
851 | 206 | { "XQST0085", "namespace URI is empty" }, | 206 | { "XQST0085", "namespace URI is empty" }, |
852 | 207 | { "XQST0087", "\"$1\": invalid encoding" }, | 207 | { "XQST0087", "\"$1\": invalid encoding" }, |
854 | 208 | { "XQST0088", "empty target namespace literal" }, | 208 | { "XQST0088", "empty target namespace in module import or module declaration" }, |
855 | 209 | { "XQST0089", "\"$1\": duplicate variable name" }, | 209 | { "XQST0089", "\"$1\": duplicate variable name" }, |
856 | 210 | { "XQST0090", "\"$1\": invalid character reference in XML $2" }, | 210 | { "XQST0090", "\"$1\": invalid character reference in XML $2" }, |
857 | 211 | { "XQST0093", "\"$1\": module must not depend on itself" }, | 211 | { "XQST0093", "\"$1\": module must not depend on itself" }, |
858 | @@ -687,7 +687,6 @@ | |||
859 | 687 | { "~NoModuleURIResolver", "no module URI resolver could be retrieved using SerializationCallback" }, | 687 | { "~NoModuleURIResolver", "no module URI resolver could be retrieved using SerializationCallback" }, |
860 | 688 | { "~NoMultiKeyNodeValues_2", "node with more than one key value found during probe on index \"$2\"" }, | 688 | { "~NoMultiKeyNodeValues_2", "node with more than one key value found during probe on index \"$2\"" }, |
861 | 689 | { "~NoParseFnArity", "could not parse function arity (maybe it's too large)" }, | 689 | { "~NoParseFnArity", "could not parse function arity (maybe it's too large)" }, |
862 | 690 | { "~NoRebindPrefix", "can not rebind predefined prefix" }, | ||
863 | 691 | { "~NoRegisteredSerializationCallback_2", "external module \"$2\" not available using registered SerializationCallback" }, | 690 | { "~NoRegisteredSerializationCallback_2", "external module \"$2\" not available using registered SerializationCallback" }, |
864 | 692 | { "~NoResolveRelativeURI", "could not resolve relative URI" }, | 691 | { "~NoResolveRelativeURI", "could not resolve relative URI" }, |
865 | 693 | { "~NoSeqAsArithOp", "sequence of more than one item can not be operand for arithmetic operation" }, | 692 | { "~NoSeqAsArithOp", "sequence of more than one item can not be operand for arithmetic operation" }, |
866 | @@ -703,8 +702,6 @@ | |||
867 | 703 | { "~NoSourceURI", "no URI" }, | 702 | { "~NoSourceURI", "no URI" }, |
868 | 704 | { "~NoStrictCompareWithType_4", "can not compare for strict inequality to type \"$4\"" }, | 703 | { "~NoStrictCompareWithType_4", "can not compare for strict inequality to type \"$4\"" }, |
869 | 705 | { "~NoTreatAs_4", "can not treat as \"$4\"" }, | 704 | { "~NoTreatAs_4", "can not treat as \"$4\"" }, |
870 | 706 | { "~NoTypeInMainModule_4", "type of variable \"$4\" is not among the in-scope types of the main module" }, | ||
871 | 707 | { "~NoTypeInModule_45", "type of variable \"$4\" is not among the in-scope types module \"$5\"" }, | ||
872 | 708 | { "~NoURIAuthority", "no authority" }, | 705 | { "~NoURIAuthority", "no authority" }, |
873 | 709 | { "~NoURIInStore", "URI for document not found in store" }, | 706 | { "~NoURIInStore", "URI for document not found in store" }, |
874 | 710 | { "~NoURIScheme", "no URI scheme" }, | 707 | { "~NoURIScheme", "no URI scheme" }, |
875 | @@ -922,7 +919,10 @@ | |||
876 | 922 | { "~XPTY0004_NoReturnTypePromote_234", "$2 can not be promoted to return type $3 of function $4()" }, | 919 | { "~XPTY0004_NoReturnTypePromote_234", "$2 can not be promoted to return type $3 of function $4()" }, |
877 | 923 | { "~XPTY0004_NoTreatAs_23", "$2 can not be treated as type $3" }, | 920 | { "~XPTY0004_NoTreatAs_23", "$2 can not be treated as type $3" }, |
878 | 924 | { "~XPTY0004_NoTypePromote_23", "$2 can not be promoted to type $3" }, | 921 | { "~XPTY0004_NoTypePromote_23", "$2 can not be promoted to type $3" }, |
880 | 925 | { "~XPTY0004_PiTarget_3", "$3: type of processing instruction target is not xs:NCName, or xs:string, or xs:untypedAtomic" }, | 922 | { "~XPTY0004_NoVarTypeInMainModule_23", "\"$2\": type of variable \"$3\" is not among the in-scope types of the main module" }, |
881 | 923 | { "~XPTY0004_NoVarTypeInModule_234", "\"$2\": type of variable \"$3\" is not among the in-scope types of module \"$4\"" }, | ||
882 | 924 | { "~XPTY0004_PiTarget_2", "$2: type of processing instruction target is not xs:NCName, or xs:string, or xs:untypedAtomic" }, | ||
883 | 925 | { "~XPTY0004_ValueNoCastTo_23", "$2: value can not be cast to type $3" }, | ||
884 | 926 | { "~XPTY0117_NodeCast", "Cannot cast node to xs:QName" }, | 926 | { "~XPTY0117_NodeCast", "Cannot cast node to xs:QName" }, |
885 | 927 | { "~XPTY0117_NotationParam_23", "$2 can not be promoted to parameter type xs:NOTATION of function $3()" }, | 927 | { "~XPTY0117_NotationParam_23", "$2 can not be promoted to parameter type xs:NOTATION of function $3()" }, |
886 | 928 | { "~XQDY0027_InvalidValue", "\"$2\": invalid value for type${: 3}${: 4}" }, | 928 | { "~XQDY0027_InvalidValue", "\"$2\": invalid value for type${: 3}${: 4}" }, |
887 | @@ -933,9 +933,21 @@ | |||
888 | 933 | { "~XQDY0074_NameSapceConstructor", "$2: cannot cast prefix to xs:NCName" }, | 933 | { "~XQDY0074_NameSapceConstructor", "$2: cannot cast prefix to xs:NCName" }, |
889 | 934 | { "~XQDY0074_NoEmptyLocalname", "can not convert empty local name to xs:QName" }, | 934 | { "~XQDY0074_NoEmptyLocalname", "can not convert empty local name to xs:QName" }, |
890 | 935 | { "~XQDY0074_NotCastToQName", "$2: can not convert to xs:QName" }, | 935 | { "~XQDY0074_NotCastToQName", "$2: can not convert to xs:QName" }, |
891 | 936 | { "~XQST0036_NoParamTypeInMainModule_23", "\"$2\": parameter type of function \"$3\" is not among the in-scope types of the main module" }, | ||
892 | 937 | { "~XQST0036_NoParamTypeInModule_234", "\"$2\": parameter type of function \"$3\" is not among the in-scope types of module \"$4\"" }, | ||
893 | 938 | { "~XQST0036_NoRetTypeInMainModule_23", "\"$2\": return type of function \"$3\" is not among the in-scope types of the main module" }, | ||
894 | 939 | { "~XQST0036_NoRetTypeInModule_234", "\"$2\": return type of function \"$3\" is not among the in-scope types of module \"$4\"" }, | ||
895 | 940 | { "~XQST0036_NoVarTypeInMainModule_23", "\"$2\": type of variable \"$3\" is not among the in-scope types of the main module" }, | ||
896 | 941 | { "~XQST0036_NoVarTypeInModule_234", "\"$2\": type of variable \"$3\" is not among the in-scope types of module \"$4\"" }, | ||
897 | 936 | { "~XQST0046_BadHexDigit_3", "'$3': invalid hexedecimal digit" }, | 942 | { "~XQST0046_BadHexDigit_3", "'$3': invalid hexedecimal digit" }, |
898 | 937 | { "~XQST0059_SpecificationMessage", "\"$2\": target namespace not found for schema/module${ \"3\"}${: 4}" }, | 943 | { "~XQST0059_SpecificationMessage", "\"$2\": target namespace not found for schema/module${ \"3\"}${: 4}" }, |
899 | 938 | { "~XQST0059_XercesMessage", "$2,$3: error in schema${ with System ID \"4\"}${ with Public ID \"5\"}${: 6}" }, | 944 | { "~XQST0059_XercesMessage", "$2,$3: error in schema${ with System ID \"4\"}${ with Public ID \"5\"}${: 6}" }, |
900 | 945 | { "~XQST0070_ReservedPrefixInDecl_2", "\"$2\": reserved prefix can not appear in namespace declaration" }, | ||
901 | 946 | { "~XQST0070_ReservedPrefixInImport_2", "\"$2\": reserved prefix can not appear in schema or module import" }, | ||
902 | 947 | { "~XQST0070_ReservedPrefixInModule_2", "\"$2\": reserved prefix can not appear in module declaration" }, | ||
903 | 948 | { "~XQST0070_ReservedPrefix_23", "\"$2\": can not rebind reserved prefix to namespace URI \"$3\"" }, | ||
904 | 949 | { "~XQST0070_ReservedURI_23", "\"$2\": can not bind prefix to reserved namespace URI \"$3\"" }, | ||
905 | 950 | { "~XQST0070_xmlnsInAttrDecl", "\"xmlns\" prefix can not be bound in namespace declaration attribute" }, | ||
906 | 939 | { "~XQST0097_MustBeChar", "must be a single character" }, | 951 | { "~XQST0097_MustBeChar", "must be a single character" }, |
907 | 940 | { "~XQST0097_MustBeZeroDigit", "must be a digit (Unicode category Nd) and represent zero" }, | 952 | { "~XQST0097_MustBeZeroDigit", "must be a digit (Unicode category Nd) and represent zero" }, |
908 | 941 | { "~XQST0106_Conflicting", "$2: conflicting annotations in declaration" }, | 953 | { "~XQST0106_Conflicting", "$2: conflicting annotations in declaration" }, |
909 | 942 | 954 | ||
910 | === modified file 'src/diagnostics/pregenerated/dict_zed_keys.h' | |||
911 | --- src/diagnostics/pregenerated/dict_zed_keys.h 2013-06-19 20:05:45 +0000 | |||
912 | +++ src/diagnostics/pregenerated/dict_zed_keys.h 2013-06-20 10:12:27 +0000 | |||
913 | @@ -48,12 +48,27 @@ | |||
914 | 48 | #define ZED_XPTY0004_NoTreatAs_23 "~XPTY0004_NoTreatAs_23" | 48 | #define ZED_XPTY0004_NoTreatAs_23 "~XPTY0004_NoTreatAs_23" |
915 | 49 | #define ZED_XPTY0004_JSONIQ_SELECTOR "~XPTY0004_JSONIQ_SELECTOR" | 49 | #define ZED_XPTY0004_JSONIQ_SELECTOR "~XPTY0004_JSONIQ_SELECTOR" |
916 | 50 | #define ZED_XPTY0004_MultiValuedGroupingKey "~XPTY0004_MultiValuedGroupingKey" | 50 | #define ZED_XPTY0004_MultiValuedGroupingKey "~XPTY0004_MultiValuedGroupingKey" |
918 | 51 | #define ZED_XPTY0004_PiTarget_3 "~XPTY0004_PiTarget_3" | 51 | #define ZED_XPTY0004_NoVarTypeInMainModule_23 "~XPTY0004_NoVarTypeInMainModule_23" |
919 | 52 | #define ZED_XPTY0004_NoVarTypeInModule_234 "~XPTY0004_NoVarTypeInModule_234" | ||
920 | 53 | #define ZED_XPTY0004_ValueNoCastTo_23 "~XPTY0004_ValueNoCastTo_23" | ||
921 | 54 | #define ZED_XPTY0004_PiTarget_2 "~XPTY0004_PiTarget_2" | ||
922 | 52 | #define ZED_XPTY0117_NodeCast "~XPTY0117_NodeCast" | 55 | #define ZED_XPTY0117_NodeCast "~XPTY0117_NodeCast" |
923 | 53 | #define ZED_XPTY0117_NotationParam_23 "~XPTY0117_NotationParam_23" | 56 | #define ZED_XPTY0117_NotationParam_23 "~XPTY0117_NotationParam_23" |
924 | 57 | #define ZED_XQST0036_NoVarTypeInMainModule_23 "~XQST0036_NoVarTypeInMainModule_23" | ||
925 | 58 | #define ZED_XQST0036_NoVarTypeInModule_234 "~XQST0036_NoVarTypeInModule_234" | ||
926 | 59 | #define ZED_XQST0036_NoRetTypeInMainModule_23 "~XQST0036_NoRetTypeInMainModule_23" | ||
927 | 60 | #define ZED_XQST0036_NoRetTypeInModule_234 "~XQST0036_NoRetTypeInModule_234" | ||
928 | 61 | #define ZED_XQST0036_NoParamTypeInMainModule_23 "~XQST0036_NoParamTypeInMainModule_23" | ||
929 | 62 | #define ZED_XQST0036_NoParamTypeInModule_234 "~XQST0036_NoParamTypeInModule_234" | ||
930 | 54 | #define ZED_XQST0046_BadHexDigit_3 "~XQST0046_BadHexDigit_3" | 63 | #define ZED_XQST0046_BadHexDigit_3 "~XQST0046_BadHexDigit_3" |
931 | 55 | #define ZED_XQST0059_SpecificationMessage "~XQST0059_SpecificationMessage" | 64 | #define ZED_XQST0059_SpecificationMessage "~XQST0059_SpecificationMessage" |
932 | 56 | #define ZED_XQST0059_XercesMessage "~XQST0059_XercesMessage" | 65 | #define ZED_XQST0059_XercesMessage "~XQST0059_XercesMessage" |
933 | 66 | #define ZED_XQST0070_ReservedPrefixInDecl_2 "~XQST0070_ReservedPrefixInDecl_2" | ||
934 | 67 | #define ZED_XQST0070_ReservedPrefixInModule_2 "~XQST0070_ReservedPrefixInModule_2" | ||
935 | 68 | #define ZED_XQST0070_ReservedPrefixInImport_2 "~XQST0070_ReservedPrefixInImport_2" | ||
936 | 69 | #define ZED_XQST0070_xmlnsInAttrDecl "~XQST0070_xmlnsInAttrDecl" | ||
937 | 70 | #define ZED_XQST0070_ReservedPrefix_23 "~XQST0070_ReservedPrefix_23" | ||
938 | 71 | #define ZED_XQST0070_ReservedURI_23 "~XQST0070_ReservedURI_23" | ||
939 | 57 | #define ZED_XQST0097_MustBeChar "~XQST0097_MustBeChar" | 72 | #define ZED_XQST0097_MustBeChar "~XQST0097_MustBeChar" |
940 | 58 | #define ZED_XQST0097_MustBeZeroDigit "~XQST0097_MustBeZeroDigit" | 73 | #define ZED_XQST0097_MustBeZeroDigit "~XQST0097_MustBeZeroDigit" |
941 | 59 | #define ZED_XQST0106_Duplicate "~XQST0106_Duplicate" | 74 | #define ZED_XQST0106_Duplicate "~XQST0106_Duplicate" |
942 | @@ -281,7 +296,6 @@ | |||
943 | 281 | #define ZED_NoModuleURIResolver "~NoModuleURIResolver" | 296 | #define ZED_NoModuleURIResolver "~NoModuleURIResolver" |
944 | 282 | #define ZED_NoMultiKeyNodeValues_2 "~NoMultiKeyNodeValues_2" | 297 | #define ZED_NoMultiKeyNodeValues_2 "~NoMultiKeyNodeValues_2" |
945 | 283 | #define ZED_NoParseFnArity "~NoParseFnArity" | 298 | #define ZED_NoParseFnArity "~NoParseFnArity" |
946 | 284 | #define ZED_NoRebindPrefix "~NoRebindPrefix" | ||
947 | 285 | #define ZED_NoRegisteredSerializationCallback_2 "~NoRegisteredSerializationCallback_2" | 299 | #define ZED_NoRegisteredSerializationCallback_2 "~NoRegisteredSerializationCallback_2" |
948 | 286 | #define ZED_NoResolveRelativeURI "~NoResolveRelativeURI" | 300 | #define ZED_NoResolveRelativeURI "~NoResolveRelativeURI" |
949 | 287 | #define ZED_NoSeqAsArithOp "~NoSeqAsArithOp" | 301 | #define ZED_NoSeqAsArithOp "~NoSeqAsArithOp" |
950 | @@ -299,8 +313,6 @@ | |||
951 | 299 | #define ZED_NoSourceURI "~NoSourceURI" | 313 | #define ZED_NoSourceURI "~NoSourceURI" |
952 | 300 | #define ZED_NoTreatAs_4 "~NoTreatAs_4" | 314 | #define ZED_NoTreatAs_4 "~NoTreatAs_4" |
953 | 301 | #define ZED_NotSingleCharEsc_3 "~NotSingleCharEsc_3" | 315 | #define ZED_NotSingleCharEsc_3 "~NotSingleCharEsc_3" |
954 | 302 | #define ZED_NoTypeInMainModule_4 "~NoTypeInMainModule_4" | ||
955 | 303 | #define ZED_NoTypeInModule_45 "~NoTypeInModule_45" | ||
956 | 304 | #define ZED_NoURIAuthority "~NoURIAuthority" | 316 | #define ZED_NoURIAuthority "~NoURIAuthority" |
957 | 305 | #define ZED_NoURIInStore "~NoURIInStore" | 317 | #define ZED_NoURIInStore "~NoURIInStore" |
958 | 306 | #define ZED_NoURIScheme "~NoURIScheme" | 318 | #define ZED_NoURIScheme "~NoURIScheme" |
959 | 307 | 319 | ||
960 | === modified file 'src/diagnostics/util_macros.h' | |||
961 | --- src/diagnostics/util_macros.h 2013-02-07 17:24:36 +0000 | |||
962 | +++ src/diagnostics/util_macros.h 2013-06-20 10:12:27 +0000 | |||
963 | @@ -19,11 +19,6 @@ | |||
964 | 19 | params, \ | 19 | params, \ |
965 | 20 | ERROR_LOC(loc)) | 20 | ERROR_LOC(loc)) |
966 | 21 | 21 | ||
967 | 22 | #define RAISE_ERROR_VAR(errcode, loc, params) \ | ||
968 | 23 | throw XQUERY_EXCEPTION_VAR(errcode, \ | ||
969 | 24 | params, \ | ||
970 | 25 | ERROR_LOC(loc)) | ||
971 | 26 | |||
972 | 27 | 22 | ||
973 | 28 | #define RAISE_ERROR_NO_LOC(errcode, params) \ | 23 | #define RAISE_ERROR_NO_LOC(errcode, params) \ |
974 | 29 | throw XQUERY_EXCEPTION(errcode, \ | 24 | throw XQUERY_EXCEPTION(errcode, \ |
975 | 30 | 25 | ||
976 | === modified file 'src/runtime/core/constructors.cpp' | |||
977 | --- src/runtime/core/constructors.cpp 2013-06-19 19:27:26 +0000 | |||
978 | +++ src/runtime/core/constructors.cpp 2013-06-20 10:12:27 +0000 | |||
979 | @@ -884,7 +884,7 @@ | |||
980 | 884 | TypeManager* tm = theSctx->get_typemanager(); | 884 | TypeManager* tm = theSctx->get_typemanager(); |
981 | 885 | xqtref_t type = tm->create_value_type(targetItem); | 885 | xqtref_t type = tm->create_value_type(targetItem); |
982 | 886 | RAISE_ERROR(err::XPTY0004, loc, | 886 | RAISE_ERROR(err::XPTY0004, loc, |
984 | 887 | ERROR_PARAMS(ZED(XPTY0004_PiTarget_3), type->toSchemaString())); | 887 | ERROR_PARAMS(ZED(XPTY0004_PiTarget_2), type->toSchemaString())); |
985 | 888 | } | 888 | } |
986 | 889 | 889 | ||
987 | 890 | if (targetType != store::XS_NCNAME) | 890 | if (targetType != store::XS_NCNAME) |
988 | 891 | 891 | ||
989 | === modified file 'src/store/naive/nsbindings.cpp' | |||
990 | --- src/store/naive/nsbindings.cpp 2013-02-26 04:12:43 +0000 | |||
991 | +++ src/store/naive/nsbindings.cpp 2013-06-20 10:12:27 +0000 | |||
992 | @@ -21,6 +21,7 @@ | |||
993 | 21 | 21 | ||
994 | 22 | #include "diagnostics/xquery_diagnostics.h" | 22 | #include "diagnostics/xquery_diagnostics.h" |
995 | 23 | #include "diagnostics/dict.h" | 23 | #include "diagnostics/dict.h" |
996 | 24 | #include "diagnostics/util_macros.h" | ||
997 | 24 | 25 | ||
998 | 25 | #include "zorbamisc/ns_consts.h" | 26 | #include "zorbamisc/ns_consts.h" |
999 | 26 | 27 | ||
1000 | @@ -117,25 +118,21 @@ | |||
1001 | 117 | void NsBindingsContext::check_ns_binding(const zstring& prefix, const zstring& uri) | 118 | void NsBindingsContext::check_ns_binding(const zstring& prefix, const zstring& uri) |
1002 | 118 | { | 119 | { |
1003 | 119 | if (ZSTREQ(prefix, "xmlns")) | 120 | if (ZSTREQ(prefix, "xmlns")) |
1008 | 120 | throw XQUERY_EXCEPTION( | 121 | { |
1009 | 121 | err::XQST0070, | 122 | RAISE_ERROR_NO_LOC(err::XQST0070, ERROR_PARAMS(ZED(XQST0070_xmlnsInAttrDecl))); |
1010 | 122 | ERROR_PARAMS( prefix, ZED( NoRebindPrefix ) ) | 123 | } |
1007 | 123 | ); | ||
1011 | 124 | 124 | ||
1012 | 125 | if ((ZSTREQ(prefix, "xml") && !ZSTREQ(uri, XML_NS))) | 125 | if ((ZSTREQ(prefix, "xml") && !ZSTREQ(uri, XML_NS))) |
1013 | 126 | { | 126 | { |
1018 | 127 | throw XQUERY_EXCEPTION( | 127 | RAISE_ERROR_NO_LOC(err::XQST0070, |
1019 | 128 | err::XQST0070, | 128 | ERROR_PARAMS(ZED(XQST0070_ReservedPrefix_23), prefix, uri)); |
1016 | 129 | ERROR_PARAMS( prefix, ZED( NoRebindPrefix ) ) | ||
1017 | 130 | ); | ||
1020 | 131 | } | 129 | } |
1021 | 132 | 130 | ||
1022 | 133 | if ((ZSTREQ(uri, XML_NS) && !ZSTREQ(prefix, "xml")) || | 131 | if ((ZSTREQ(uri, XML_NS) && !ZSTREQ(prefix, "xml")) || |
1023 | 134 | ZSTREQ(uri, XMLNS_NS)) | 132 | ZSTREQ(uri, XMLNS_NS)) |
1024 | 135 | { | 133 | { |
1028 | 136 | throw XQUERY_EXCEPTION( | 134 | RAISE_ERROR_NO_LOC(err::XQST0070, |
1029 | 137 | err::XQST0070, ERROR_PARAMS( uri, ZED( NoBindURI ) ) | 135 | ERROR_PARAMS(ZED(XQST0070_ReservedURI_23), prefix, uri)); |
1027 | 138 | ); | ||
1030 | 139 | } | 136 | } |
1031 | 140 | 137 | ||
1032 | 141 | } | 138 | } |
1033 | 142 | 139 | ||
1034 | === modified file 'test/fots/CMakeLists.txt' | |||
1035 | --- test/fots/CMakeLists.txt 2013-06-19 17:19:18 +0000 | |||
1036 | +++ test/fots/CMakeLists.txt 2013-06-20 10:12:27 +0000 | |||
1037 | @@ -231,8 +231,6 @@ | |||
1038 | 231 | EXPECTED_FOTS_FAILURE (prod-CastExpr.schema CastAs-ListType-31 1110217) | 231 | EXPECTED_FOTS_FAILURE (prod-CastExpr.schema CastAs-ListType-31 1110217) |
1039 | 232 | EXPECTED_FOTS_FAILURE (prod-CompDocConstructor K2-ConDocNode-2 1188302) | 232 | EXPECTED_FOTS_FAILURE (prod-CompDocConstructor K2-ConDocNode-2 1188302) |
1040 | 233 | EXPECTED_FOTS_FAILURE (prod-CompNamespaceConstructor nscons-042 1188285) | 233 | EXPECTED_FOTS_FAILURE (prod-CompNamespaceConstructor nscons-042 1188285) |
1041 | 234 | EXPECTED_FOTS_FAILURE (prod-DefaultNamespaceDecl defaultnamespacedeclerr-6 1188283) | ||
1042 | 235 | EXPECTED_FOTS_FAILURE (prod-DefaultNamespaceDecl defaultnamespacedeclerr-8 1188283) | ||
1043 | 236 | EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-charref-2 1130998) | 234 | EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-charref-2 1130998) |
1044 | 237 | EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-007 1114221) | 235 | EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-007 1114221) |
1045 | 238 | EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-008 1114221) | 236 | EXPECTED_FOTS_FAILURE (prod-FunctionCall FunctionCall-008 1114221) |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ markos- scratch- 2013-06- 20T10-02- 14.106Z/ log.html
Log at: http://