Merge lp:~paul-lucas/zorba/bug-867027 into lp:zorba
- bug-867027
- Merge into trunk
Status: | Merged | ||||
---|---|---|---|---|---|
Approved by: | Matthias Brantner | ||||
Approved revision: | 11224 | ||||
Merged at revision: | 11226 | ||||
Proposed branch: | lp:~paul-lucas/zorba/bug-867027 | ||||
Merge into: | lp:zorba | ||||
Diff against target: |
504 lines (+147/-76) 11 files modified
ChangeLog (+1/-0) include/zorba/pregenerated/diagnostic_list.h (+6/-0) modules/com/zorba-xquery/www/modules/pregenerated/errors.xq (+12/-0) modules/w3c/pregenerated/xqt-errors.xq (+4/-4) src/compiler/translator/translator.cpp (+39/-5) src/diagnostics/diagnostic_en.xml (+26/-19) src/diagnostics/pregenerated/diagnostic_list.cpp (+9/-0) src/diagnostics/pregenerated/dict_en.cpp (+6/-3) src/diagnostics/pregenerated/dict_zed_keys.h (+2/-2) src/types/schema/LoadSchemaErrorHandler.cpp (+19/-31) src/types/schema/schema.cpp (+23/-12) |
||||
To merge this branch: | bzr merge lp:~paul-lucas/zorba/bug-867027 | ||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Matthias Brantner | Approve | ||
Paul J. Lucas | Approve | ||
Review via email: mp+147257@code.launchpad.net |
Commit message
Created new error codes to handle errors other than what XQST0059 was intended for.
Description of the change
Created new error codes to handle errors other than what XQST0059 was intended for.
Paul J. Lucas (paul-lucas) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
The attempt to merge lp:~paul-lucas/zorba/bug-867027 into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job bug-867027-2013-02-
final status was:
3 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 : | # |
The attempt to merge lp:~paul-lucas/zorba/bug-867027 into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job bug-867027-2013-02-
final status was:
No tests were run - build or configure step must have failed.
Not commiting changes.
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 : | # |
The attempt to merge lp:~paul-lucas/zorba/bug-867027 into lp:zorba failed. Below is the output from the failed tests.
CMake Error at /home/ceej/
Validation queue job bug-867027-2013-02-
final status was:
1 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 bug-867027-2013-02-
All tests succeeded!
Zorba Build Bot (zorba-buildbot) wrote : | # |
Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.
Matthias Brantner (matthias-brantner) : | # |
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue starting for merge proposal.
Log at: http://
Zorba Build Bot (zorba-buildbot) wrote : | # |
Validation queue job bug-867027-2013-02-
All tests succeeded!
Preview Diff
1 | === modified file 'ChangeLog' | |||
2 | --- ChangeLog 2013-02-03 17:44:39 +0000 | |||
3 | +++ ChangeLog 2013-02-08 02:57:22 +0000 | |||
4 | @@ -15,6 +15,7 @@ | |||
5 | 15 | collection). | 15 | collection). |
6 | 16 | 16 | ||
7 | 17 | Bug Fixes/Other Changes: | 17 | Bug Fixes/Other Changes: |
8 | 18 | * Fixed bug #867027 (XQST0059 error messages inconsistent) | ||
9 | 18 | * Fixed bug #1095889 (Improve error message for xml-parsing error). | 19 | * Fixed bug #1095889 (Improve error message for xml-parsing error). |
10 | 19 | * NaN items are considered equal to each other during grouping | 20 | * NaN items are considered equal to each other during grouping |
11 | 20 | * Fixed bug #855481 (Too small time types on Windows). | 21 | * Fixed bug #855481 (Too small time types on Windows). |
12 | 21 | 22 | ||
13 | === modified file 'include/zorba/pregenerated/diagnostic_list.h' | |||
14 | --- include/zorba/pregenerated/diagnostic_list.h 2013-01-23 17:24:44 +0000 | |||
15 | +++ include/zorba/pregenerated/diagnostic_list.h 2013-02-08 02:57:22 +0000 | |||
16 | @@ -422,6 +422,8 @@ | |||
17 | 422 | 422 | ||
18 | 423 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0013_FXCHARHEAP_EXCEPTION; | 423 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0013_FXCHARHEAP_EXCEPTION; |
19 | 424 | 424 | ||
20 | 425 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0014_OUT_OF_MEMORY; | ||
21 | 426 | |||
22 | 425 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0016_RESERVED_MODULE_TARGET_NAMESPACE; | 427 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0016_RESERVED_MODULE_TARGET_NAMESPACE; |
23 | 426 | 428 | ||
24 | 427 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0017_FILE_ACCESS_DISABLED; | 429 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0017_FILE_ACCESS_DISABLED; |
25 | @@ -446,6 +448,10 @@ | |||
26 | 446 | 448 | ||
27 | 447 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0032_ERROR_TRANSFORMING_XQUERYX_TO_XQUERY; | 449 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0032_ERROR_TRANSFORMING_XQUERYX_TO_XQUERY; |
28 | 448 | 450 | ||
29 | 451 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0033_SCHEMA_XML_ERROR; | ||
30 | 452 | |||
31 | 453 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0035_SCHEMA_UNEXPECTED_ERROR; | ||
32 | 454 | |||
33 | 449 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0036_BREAKITERATOR_CREATION_FAILED; | 455 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0036_BREAKITERATOR_CREATION_FAILED; |
34 | 450 | 456 | ||
35 | 451 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0037_INAPPROPRIATE_MODULE_VERSION; | 457 | extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0037_INAPPROPRIATE_MODULE_VERSION; |
36 | 452 | 458 | ||
37 | === modified file 'modules/com/zorba-xquery/www/modules/pregenerated/errors.xq' | |||
38 | --- modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2013-01-08 00:31:47 +0000 | |||
39 | +++ modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2013-02-08 02:57:22 +0000 | |||
40 | @@ -113,6 +113,10 @@ | |||
41 | 113 | 113 | ||
42 | 114 | (:~ | 114 | (:~ |
43 | 115 | :) | 115 | :) |
44 | 116 | declare variable $zerr:ZXQP0014 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0014"); | ||
45 | 117 | |||
46 | 118 | (:~ | ||
47 | 119 | :) | ||
48 | 116 | declare variable $zerr:ZXQP0016 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0016"); | 120 | declare variable $zerr:ZXQP0016 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0016"); |
49 | 117 | 121 | ||
50 | 118 | (:~ | 122 | (:~ |
51 | @@ -161,6 +165,14 @@ | |||
52 | 161 | 165 | ||
53 | 162 | (:~ | 166 | (:~ |
54 | 163 | :) | 167 | :) |
55 | 168 | declare variable $zerr:ZXQP0033 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0033"); | ||
56 | 169 | |||
57 | 170 | (:~ | ||
58 | 171 | :) | ||
59 | 172 | declare variable $zerr:ZXQP0035 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0035"); | ||
60 | 173 | |||
61 | 174 | (:~ | ||
62 | 175 | :) | ||
63 | 164 | declare variable $zerr:ZXQP0036 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0036"); | 176 | declare variable $zerr:ZXQP0036 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0036"); |
64 | 165 | 177 | ||
65 | 166 | (:~ | 178 | (:~ |
66 | 167 | 179 | ||
67 | === modified file 'modules/w3c/pregenerated/xqt-errors.xq' | |||
68 | --- modules/w3c/pregenerated/xqt-errors.xq 2013-01-19 20:47:55 +0000 | |||
69 | +++ modules/w3c/pregenerated/xqt-errors.xq 2013-02-08 02:57:22 +0000 | |||
70 | @@ -420,8 +420,8 @@ | |||
71 | 420 | 420 | ||
72 | 421 | (:~ | 421 | (:~ |
73 | 422 | : | 422 | : |
76 | 423 | : It is a static error if a schema import binds a namespace prefix but does | 423 | : It is a static error if a schema import binds a namespace prefix but |
77 | 424 | : not specify a target namespace other than a zero-length string. | 424 | : does not specify a target namespace other than a zero-length string. |
78 | 425 | : | 425 | : |
79 | 426 | : @see http://www.w3.org/2005/xqt-errors | 426 | : @see http://www.w3.org/2005/xqt-errors |
80 | 427 | :) | 427 | :) |
81 | @@ -439,8 +439,8 @@ | |||
82 | 439 | (:~ | 439 | (:~ |
83 | 440 | : | 440 | : |
84 | 441 | : It is a static error if an implementation is unable to process a schema | 441 | : It is a static error if an implementation is unable to process a schema |
87 | 442 | : or module import by finding a schema or module with the specified target | 442 | : or module import by finding a schema or module with the specified |
88 | 443 | : namespace. | 443 | : target namespace. |
89 | 444 | : | 444 | : |
90 | 445 | : @see http://www.w3.org/2005/xqt-errors | 445 | : @see http://www.w3.org/2005/xqt-errors |
91 | 446 | :) | 446 | :) |
92 | 447 | 447 | ||
93 | === modified file 'src/compiler/translator/translator.cpp' | |||
94 | --- src/compiler/translator/translator.cpp 2013-01-29 06:01:31 +0000 | |||
95 | +++ src/compiler/translator/translator.cpp 2013-02-08 02:57:22 +0000 | |||
96 | @@ -2197,7 +2197,13 @@ | |||
97 | 2197 | } | 2197 | } |
98 | 2198 | 2198 | ||
99 | 2199 | if ( lStream == NULL ) { | 2199 | if ( lStream == NULL ) { |
101 | 2200 | throw XQUERY_EXCEPTION(err::XQST0059, ERROR_PARAMS(lNsURI, lErrorMessage)); | 2200 | throw XQUERY_EXCEPTION( |
102 | 2201 | err::XQST0059, | ||
103 | 2202 | ERROR_PARAMS( | ||
104 | 2203 | ZED( XQST0059_SpecificationMessage ), | ||
105 | 2204 | lNsURI, "", lErrorMessage | ||
106 | 2205 | ) | ||
107 | 2206 | ); | ||
108 | 2201 | } | 2207 | } |
109 | 2202 | 2208 | ||
110 | 2203 | // If we got this far, we have a valid StreamResource. | 2209 | // If we got this far, we have a valid StreamResource. |
111 | @@ -3086,7 +3092,14 @@ | |||
112 | 3086 | if (theModulesInfo->mod_ns_map.get(compURI, importedNS)) | 3092 | if (theModulesInfo->mod_ns_map.get(compURI, importedNS)) |
113 | 3087 | { | 3093 | { |
114 | 3088 | if (importedNS != targetNS) | 3094 | if (importedNS != targetNS) |
116 | 3089 | RAISE_ERROR(err::XQST0059, loc, ERROR_PARAMS(targetNS, compURI)); | 3095 | throw XQUERY_EXCEPTION( |
117 | 3096 | err::XQST0059, | ||
118 | 3097 | ERROR_PARAMS( | ||
119 | 3098 | ZED( XQST0059_SpecificationMessage ), | ||
120 | 3099 | targetNS, compURI | ||
121 | 3100 | ), | ||
122 | 3101 | ERROR_LOC( loc ) | ||
123 | 3102 | ); | ||
124 | 3090 | 3103 | ||
125 | 3091 | bool found = theModulesInfo->mod_sctx_map.get(compURI, importedSctx); | 3104 | bool found = theModulesInfo->mod_sctx_map.get(compURI, importedSctx); |
126 | 3092 | ZORBA_ASSERT(found); | 3105 | ZORBA_ASSERT(found); |
127 | @@ -3129,7 +3142,14 @@ | |||
128 | 3129 | } | 3142 | } |
129 | 3130 | else | 3143 | else |
130 | 3131 | { | 3144 | { |
132 | 3132 | RAISE_ERROR(err::XQST0059, loc, ERROR_PARAMS(targetNS, compURI, lErrorMessage)); | 3145 | throw XQUERY_EXCEPTION( |
133 | 3146 | err::XQST0059, | ||
134 | 3147 | ERROR_PARAMS( | ||
135 | 3148 | ZED( XQST0059_SpecificationMessage ), | ||
136 | 3149 | targetNS, compURI, lErrorMessage | ||
137 | 3150 | ), | ||
138 | 3151 | ERROR_LOC( loc ) | ||
139 | 3152 | ); | ||
140 | 3133 | } | 3153 | } |
141 | 3134 | 3154 | ||
142 | 3135 | // Get the parent of the query root sctx. This is the user-specified sctx | 3155 | // Get the parent of the query root sctx. This is the user-specified sctx |
143 | @@ -3185,7 +3205,14 @@ | |||
144 | 3185 | // Also make sure that the imported module is a library module | 3205 | // Also make sure that the imported module is a library module |
145 | 3186 | LibraryModule* mod_ast = dynamic_cast<LibraryModule *>(&*ast); | 3206 | LibraryModule* mod_ast = dynamic_cast<LibraryModule *>(&*ast); |
146 | 3187 | if (mod_ast == NULL) | 3207 | if (mod_ast == NULL) |
148 | 3188 | RAISE_ERROR(err::XQST0059, loc, ERROR_PARAMS(targetNS, compURI)); | 3208 | throw XQUERY_EXCEPTION( |
149 | 3209 | err::XQST0059, | ||
150 | 3210 | ERROR_PARAMS( | ||
151 | 3211 | ZED( XQST0059_SpecificationMessage ), | ||
152 | 3212 | targetNS, compURI | ||
153 | 3213 | ), | ||
154 | 3214 | ERROR_LOC( loc ) | ||
155 | 3215 | ); | ||
156 | 3189 | 3216 | ||
157 | 3190 | importedNS = mod_ast->get_decl()->get_target_namespace().str(); | 3217 | importedNS = mod_ast->get_decl()->get_target_namespace().str(); |
158 | 3191 | 3218 | ||
159 | @@ -3193,7 +3220,14 @@ | |||
160 | 3193 | throw XQUERY_EXCEPTION(err::XQST0088, ERROR_LOC(loc)); | 3220 | throw XQUERY_EXCEPTION(err::XQST0088, ERROR_LOC(loc)); |
161 | 3194 | 3221 | ||
162 | 3195 | if (importedNS != targetNS) | 3222 | if (importedNS != targetNS) |
164 | 3196 | RAISE_ERROR(err::XQST0059, loc, ERROR_PARAMS(targetNS, compURI)); | 3223 | throw XQUERY_EXCEPTION( |
165 | 3224 | err::XQST0059, | ||
166 | 3225 | ERROR_PARAMS( | ||
167 | 3226 | ZED( XQST0059_SpecificationMessage ), | ||
168 | 3227 | targetNS, compURI | ||
169 | 3228 | ), | ||
170 | 3229 | ERROR_LOC( loc ) | ||
171 | 3230 | ); | ||
172 | 3197 | 3231 | ||
173 | 3198 | // translate the imported module | 3232 | // translate the imported module |
174 | 3199 | translate_aux(theRootTranslator, | 3233 | translate_aux(theRootTranslator, |
175 | 3200 | 3234 | ||
176 | === modified file 'src/diagnostics/diagnostic_en.xml' | |||
177 | --- src/diagnostics/diagnostic_en.xml 2013-02-03 19:01:15 +0000 | |||
178 | +++ src/diagnostics/diagnostic_en.xml 2013-02-08 02:57:22 +0000 | |||
179 | @@ -572,27 +572,33 @@ | |||
180 | 572 | 572 | ||
181 | 573 | <diagnostic code="XQST0057"> | 573 | <diagnostic code="XQST0057"> |
182 | 574 | <comment> | 574 | <comment> |
185 | 575 | It is a static error if a schema import binds a namespace prefix but does | 575 | It is a static error if a schema import binds a namespace prefix but |
186 | 576 | not specify a target namespace other than a zero-length string. | 576 | does not specify a target namespace other than a zero-length string. |
187 | 577 | </comment> | 577 | </comment> |
188 | 578 | <value>empty target namespace</value> | 578 | <value>empty target namespace</value> |
189 | 579 | </diagnostic> | 579 | </diagnostic> |
190 | 580 | 580 | ||
191 | 581 | <diagnostic code="XQST0058"> | 581 | <diagnostic code="XQST0058"> |
192 | 582 | <comment> | 582 | <comment> |
195 | 583 | It is a static error if multiple schema imports specify the same target | 583 | It is a static error if multiple schema imports specify the same target |
196 | 584 | namespace. | 584 | namespace. |
197 | 585 | </comment> | 585 | </comment> |
198 | 586 | <value>"$1": duplicate target namespace</value> | 586 | <value>"$1": duplicate target namespace</value> |
199 | 587 | </diagnostic> | 587 | </diagnostic> |
200 | 588 | 588 | ||
201 | 589 | <diagnostic code="XQST0059"> | 589 | <diagnostic code="XQST0059"> |
202 | 590 | <comment> | 590 | <comment> |
206 | 591 | It is a static error if an implementation is unable to process a schema | 591 | It is a static error if an implementation is unable to process a schema |
207 | 592 | or module import by finding a schema or module with the specified target | 592 | or module import by finding a schema or module with the specified |
208 | 593 | namespace. | 593 | target namespace. |
209 | 594 | </comment> | 594 | </comment> |
211 | 595 | <value>"$1": target namespace not found for schema/module${ 2}</value> | 595 | <value>$1</value> |
212 | 596 | <entry key="SpecificationMessage"> | ||
213 | 597 | <value>"$2": target namespace not found for schema/module${ "3"}${: 4}</value> | ||
214 | 598 | </entry> | ||
215 | 599 | <entry key="XercesMessage"> | ||
216 | 600 | <value>$2,$3: error in schema${ with System ID "4"}${ with Public ID "5"}${: 6}</value> | ||
217 | 601 | </entry> | ||
218 | 596 | </diagnostic> | 602 | </diagnostic> |
219 | 597 | 603 | ||
220 | 598 | <diagnostic code="XQST0060"> | 604 | <diagnostic code="XQST0060"> |
221 | @@ -1964,6 +1970,10 @@ | |||
222 | 1964 | <value>FxCharHeap error: $1 ($2)</value> | 1970 | <value>FxCharHeap error: $1 ($2)</value> |
223 | 1965 | </diagnostic> | 1971 | </diagnostic> |
224 | 1966 | 1972 | ||
225 | 1973 | <diagnostic code="ZXQP0014" name="OUT_OF_MEMORY"> | ||
226 | 1974 | <value>${"1": }out of memory${: 2}</value> | ||
227 | 1975 | </diagnostic> | ||
228 | 1976 | |||
229 | 1967 | <diagnostic code="ZXQP0016" name="RESERVED_MODULE_TARGET_NAMESPACE"> | 1977 | <diagnostic code="ZXQP0016" name="RESERVED_MODULE_TARGET_NAMESPACE"> |
230 | 1968 | <value>"$1": reserved module target namespace</value> | 1978 | <value>"$1": reserved module target namespace</value> |
231 | 1969 | </diagnostic> | 1979 | </diagnostic> |
232 | @@ -1986,7 +1996,6 @@ | |||
233 | 1986 | 1996 | ||
234 | 1987 | <diagnostic code="ZXQP0025" name="COULD_NOT_FETCH_RESOURCE"> | 1997 | <diagnostic code="ZXQP0025" name="COULD_NOT_FETCH_RESOURCE"> |
235 | 1988 | <value>"$1": could not fetch resource${; reason: 2}</value> | 1998 | <value>"$1": could not fetch resource${; reason: 2}</value> |
236 | 1989 | |||
237 | 1990 | <entry key="RESOURCE_NOT_FOUND"> | 1999 | <entry key="RESOURCE_NOT_FOUND"> |
238 | 1991 | <value>resource not found</value> | 2000 | <value>resource not found</value> |
239 | 1992 | </entry> | 2001 | </entry> |
240 | @@ -2016,6 +2025,14 @@ | |||
241 | 2016 | <value>error transforming XQueryX to XQuery${: 1}</value> | 2025 | <value>error transforming XQueryX to XQuery${: 1}</value> |
242 | 2017 | </diagnostic> | 2026 | </diagnostic> |
243 | 2018 | 2027 | ||
244 | 2028 | <diagnostic code="ZXQP0033" name="SCHEMA_XML_ERROR"> | ||
245 | 2029 | <value>${"1": }XML error in schema${: 2}</value> | ||
246 | 2030 | </diagnostic> | ||
247 | 2031 | |||
248 | 2032 | <diagnostic code="ZXQP0035" name="SCHEMA_UNEXPECTED_ERROR"> | ||
249 | 2033 | <value>${"1": }unexpected error in schema${: 2}</value> | ||
250 | 2034 | </diagnostic> | ||
251 | 2035 | |||
252 | 2019 | <diagnostic code="ZXQP0036" name="BREAKITERATOR_CREATION_FAILED"> | 2036 | <diagnostic code="ZXQP0036" name="BREAKITERATOR_CREATION_FAILED"> |
253 | 2020 | <value>BreakIterator creation failed</value> | 2037 | <value>BreakIterator creation failed</value> |
254 | 2021 | </diagnostic> | 2038 | </diagnostic> |
255 | @@ -2037,9 +2054,7 @@ | |||
256 | 2037 | </diagnostic> | 2054 | </diagnostic> |
257 | 2038 | 2055 | ||
258 | 2039 | <diagnostic code="ZXQP0050" name="FEATURE_NOT_AVAILABLE"> | 2056 | <diagnostic code="ZXQP0050" name="FEATURE_NOT_AVAILABLE"> |
259 | 2040 | |||
260 | 2041 | <value>"$1": feature not available</value> | 2057 | <value>"$1": feature not available</value> |
261 | 2042 | |||
262 | 2043 | </diagnostic> | 2058 | </diagnostic> |
263 | 2044 | 2059 | ||
264 | 2045 | <diagnostic code="ZXQP0060" name="OPTION_NOT_KNOWN"> | 2060 | <diagnostic code="ZXQP0060" name="OPTION_NOT_KNOWN"> |
265 | @@ -3719,14 +3734,6 @@ | |||
266 | 3719 | <value>the standalone attribute has a value other than "omit"</value> | 3734 | <value>the standalone attribute has a value other than "omit"</value> |
267 | 3720 | </entry> | 3735 | </entry> |
268 | 3721 | 3736 | ||
269 | 3722 | <entry key="SchemaOutOfMemory"> | ||
270 | 3723 | <value>OutOfMemoryException during parsing</value> | ||
271 | 3724 | </entry> | ||
272 | 3725 | |||
273 | 3726 | <entry key="SchemaParseError"> | ||
274 | 3727 | <value>error during parsing</value> | ||
275 | 3728 | </entry> | ||
276 | 3729 | |||
277 | 3730 | <entry key="SchemaUnexpected"> | 3737 | <entry key="SchemaUnexpected"> |
278 | 3731 | <value>unexpected exception during parsing</value> | 3738 | <value>unexpected exception during parsing</value> |
279 | 3732 | </entry> | 3739 | </entry> |
280 | 3733 | 3740 | ||
281 | === modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp' | |||
282 | --- src/diagnostics/pregenerated/diagnostic_list.cpp 2013-01-23 17:24:44 +0000 | |||
283 | +++ src/diagnostics/pregenerated/diagnostic_list.cpp 2013-02-08 02:57:22 +0000 | |||
284 | @@ -613,6 +613,9 @@ | |||
285 | 613 | ZorbaErrorCode ZXQP0013_FXCHARHEAP_EXCEPTION( "ZXQP0013" ); | 613 | ZorbaErrorCode ZXQP0013_FXCHARHEAP_EXCEPTION( "ZXQP0013" ); |
286 | 614 | 614 | ||
287 | 615 | 615 | ||
288 | 616 | ZorbaErrorCode ZXQP0014_OUT_OF_MEMORY( "ZXQP0014" ); | ||
289 | 617 | |||
290 | 618 | |||
291 | 616 | ZorbaErrorCode ZXQP0016_RESERVED_MODULE_TARGET_NAMESPACE( "ZXQP0016" ); | 619 | ZorbaErrorCode ZXQP0016_RESERVED_MODULE_TARGET_NAMESPACE( "ZXQP0016" ); |
292 | 617 | 620 | ||
293 | 618 | 621 | ||
294 | @@ -649,6 +652,12 @@ | |||
295 | 649 | ZorbaErrorCode ZXQP0032_ERROR_TRANSFORMING_XQUERYX_TO_XQUERY( "ZXQP0032" ); | 652 | ZorbaErrorCode ZXQP0032_ERROR_TRANSFORMING_XQUERYX_TO_XQUERY( "ZXQP0032" ); |
296 | 650 | 653 | ||
297 | 651 | 654 | ||
298 | 655 | ZorbaErrorCode ZXQP0033_SCHEMA_XML_ERROR( "ZXQP0033" ); | ||
299 | 656 | |||
300 | 657 | |||
301 | 658 | ZorbaErrorCode ZXQP0035_SCHEMA_UNEXPECTED_ERROR( "ZXQP0035" ); | ||
302 | 659 | |||
303 | 660 | |||
304 | 652 | ZorbaErrorCode ZXQP0036_BREAKITERATOR_CREATION_FAILED( "ZXQP0036" ); | 661 | ZorbaErrorCode ZXQP0036_BREAKITERATOR_CREATION_FAILED( "ZXQP0036" ); |
305 | 653 | 662 | ||
306 | 654 | 663 | ||
307 | 655 | 664 | ||
308 | === modified file 'src/diagnostics/pregenerated/dict_en.cpp' | |||
309 | --- src/diagnostics/pregenerated/dict_en.cpp 2013-02-03 19:01:15 +0000 | |||
310 | +++ src/diagnostics/pregenerated/dict_en.cpp 2013-02-08 02:57:22 +0000 | |||
311 | @@ -230,7 +230,7 @@ | |||
312 | 230 | { "XQST0055", "multiple copy-namespaces declarations" }, | 230 | { "XQST0055", "multiple copy-namespaces declarations" }, |
313 | 231 | { "XQST0057", "empty target namespace" }, | 231 | { "XQST0057", "empty target namespace" }, |
314 | 232 | { "XQST0058", "\"$1\": duplicate target namespace" }, | 232 | { "XQST0058", "\"$1\": duplicate target namespace" }, |
316 | 233 | { "XQST0059", "\"$1\": target namespace not found for schema/module${ 2}" }, | 233 | { "XQST0059", "$1" }, |
317 | 234 | { "XQST0060", "\"$1\": function name has a null namespace URI" }, | 234 | { "XQST0060", "\"$1\": function name has a null namespace URI" }, |
318 | 235 | { "XQST0065", "multiple ordering mode declaraions" }, | 235 | { "XQST0065", "multiple ordering mode declaraions" }, |
319 | 236 | { "XQST0066", "multiple element/type/function namespace declarations" }, | 236 | { "XQST0066", "multiple element/type/function namespace declarations" }, |
320 | @@ -498,6 +498,7 @@ | |||
321 | 498 | { "ZXQP0011", "\"$1\": invalid locale" }, | 498 | { "ZXQP0011", "\"$1\": invalid locale" }, |
322 | 499 | { "ZXQP0012", "\"$1\": unknown locale" }, | 499 | { "ZXQP0012", "\"$1\": unknown locale" }, |
323 | 500 | { "ZXQP0013", "FxCharHeap error: $1 ($2)" }, | 500 | { "ZXQP0013", "FxCharHeap error: $1 ($2)" }, |
324 | 501 | { "ZXQP0014", "${\"1\": }out of memory${: 2}" }, | ||
325 | 501 | { "ZXQP0016", "\"$1\": reserved module target namespace" }, | 502 | { "ZXQP0016", "\"$1\": reserved module target namespace" }, |
326 | 502 | { "ZXQP0017", "file access disabled" }, | 503 | { "ZXQP0017", "file access disabled" }, |
327 | 503 | { "ZXQP0020", "\"$1\": invalid URI${: 2}" }, | 504 | { "ZXQP0020", "\"$1\": invalid URI${: 2}" }, |
328 | @@ -510,6 +511,8 @@ | |||
329 | 510 | { "ZXQP0030", "deadlock" }, | 511 | { "ZXQP0030", "deadlock" }, |
330 | 511 | { "ZXQP0031", "malformed XQueryX XML input${: 1}" }, | 512 | { "ZXQP0031", "malformed XQueryX XML input${: 1}" }, |
331 | 512 | { "ZXQP0032", "error transforming XQueryX to XQuery${: 1}" }, | 513 | { "ZXQP0032", "error transforming XQueryX to XQuery${: 1}" }, |
332 | 514 | { "ZXQP0033", "${\"1\": }XML error in schema${: 2}" }, | ||
333 | 515 | { "ZXQP0035", "${\"1\": }unexpected error in schema${: 2}" }, | ||
334 | 513 | { "ZXQP0036", "BreakIterator creation failed" }, | 516 | { "ZXQP0036", "BreakIterator creation failed" }, |
335 | 514 | { "ZXQP0037", "\"$1\": loaded module version \"$2\" does not match import version specification" }, | 517 | { "ZXQP0037", "\"$1\": loaded module version \"$2\" does not match import version specification" }, |
336 | 515 | { "ZXQP0038", "Query requires Zorba version \"$1\"; you are running Zorba \"$2\"" }, | 518 | { "ZXQP0038", "Query requires Zorba version \"$1\"; you are running Zorba \"$2\"" }, |
337 | @@ -799,8 +802,6 @@ | |||
338 | 799 | #endif | 802 | #endif |
339 | 800 | { "~SEPM0009_Not10", "the version parameter has a value other than \"1.0\" and the doctype-system parameter is specified" }, | 803 | { "~SEPM0009_Not10", "the version parameter has a value other than \"1.0\" and the doctype-system parameter is specified" }, |
340 | 801 | { "~SEPM0009_NotOmit", "the standalone attribute has a value other than \"omit\"" }, | 804 | { "~SEPM0009_NotOmit", "the standalone attribute has a value other than \"omit\"" }, |
341 | 802 | { "~SchemaOutOfMemory", "OutOfMemoryException during parsing" }, | ||
342 | 803 | { "~SchemaParseError", "error during parsing" }, | ||
343 | 804 | { "~SchemaUnexpected", "unexpected exception during parsing" }, | 805 | { "~SchemaUnexpected", "unexpected exception during parsing" }, |
344 | 805 | { "~SearchKeyTypeMismatch_234", "\"$2\": search key type for index \"$3\" does not match expected type \"$4\"" }, | 806 | { "~SearchKeyTypeMismatch_234", "\"$2\": search key type for index \"$3\" does not match expected type \"$4\"" }, |
345 | 806 | { "~SearchKeyTypeNoProbeIndex_23", "\"$2\": search key type can not probe index \"$3\"" }, | 807 | { "~SearchKeyTypeNoProbeIndex_23", "\"$2\": search key type can not probe index \"$3\"" }, |
346 | @@ -918,6 +919,8 @@ | |||
347 | 918 | { "~XPTY0117_NodeCast", "Cannot cast node to xs:QName" }, | 919 | { "~XPTY0117_NodeCast", "Cannot cast node to xs:QName" }, |
348 | 919 | { "~XPTY0117_NotationParam_23", "$2 can not be promoted to parameter type xs:NOTATION of function $3()" }, | 920 | { "~XPTY0117_NotationParam_23", "$2 can not be promoted to parameter type xs:NOTATION of function $3()" }, |
349 | 920 | { "~XQST0046_BadHexDigit_3", "'$3': invalid hexedecimal digit" }, | 921 | { "~XQST0046_BadHexDigit_3", "'$3': invalid hexedecimal digit" }, |
350 | 922 | { "~XQST0059_SpecificationMessage", "\"$2\": target namespace not found for schema/module${ \"3\"}${: 4}" }, | ||
351 | 923 | { "~XQST0059_XercesMessage", "$2,$3: error in schema${ with System ID \"4\"}${ with Public ID \"5\"}${: 6}" }, | ||
352 | 921 | { "~XQST0106_CONFLICTING", "conflicting" }, | 924 | { "~XQST0106_CONFLICTING", "conflicting" }, |
353 | 922 | { "~XQST0106_THE_SAME", "the same" }, | 925 | { "~XQST0106_THE_SAME", "the same" }, |
354 | 923 | { "~XUDY0021_AttributeName", "\"$3\": attribute with the same name already exists" }, | 926 | { "~XUDY0021_AttributeName", "\"$3\": attribute with the same name already exists" }, |
355 | 924 | 927 | ||
356 | === modified file 'src/diagnostics/pregenerated/dict_zed_keys.h' | |||
357 | --- src/diagnostics/pregenerated/dict_zed_keys.h 2013-02-03 19:01:15 +0000 | |||
358 | +++ src/diagnostics/pregenerated/dict_zed_keys.h 2013-02-08 02:57:22 +0000 | |||
359 | @@ -50,6 +50,8 @@ | |||
360 | 50 | #define ZED_XPTY0117_NodeCast "~XPTY0117_NodeCast" | 50 | #define ZED_XPTY0117_NodeCast "~XPTY0117_NodeCast" |
361 | 51 | #define ZED_XPTY0117_NotationParam_23 "~XPTY0117_NotationParam_23" | 51 | #define ZED_XPTY0117_NotationParam_23 "~XPTY0117_NotationParam_23" |
362 | 52 | #define ZED_XQST0046_BadHexDigit_3 "~XQST0046_BadHexDigit_3" | 52 | #define ZED_XQST0046_BadHexDigit_3 "~XQST0046_BadHexDigit_3" |
363 | 53 | #define ZED_XQST0059_SpecificationMessage "~XQST0059_SpecificationMessage" | ||
364 | 54 | #define ZED_XQST0059_XercesMessage "~XQST0059_XercesMessage" | ||
365 | 53 | #define ZED_XQST0106_THE_SAME "~XQST0106_THE_SAME" | 55 | #define ZED_XQST0106_THE_SAME "~XQST0106_THE_SAME" |
366 | 54 | #define ZED_XQST0106_CONFLICTING "~XQST0106_CONFLICTING" | 56 | #define ZED_XQST0106_CONFLICTING "~XQST0106_CONFLICTING" |
367 | 55 | #define ZED_XPDY0002_VariableHasNoValue_2 "~XPDY0002_VariableHasNoValue_2" | 57 | #define ZED_XPDY0002_VariableHasNoValue_2 "~XPDY0002_VariableHasNoValue_2" |
368 | @@ -255,8 +257,6 @@ | |||
369 | 255 | #define ZED_QuotedColon_23 "~QuotedColon_23" | 257 | #define ZED_QuotedColon_23 "~QuotedColon_23" |
370 | 256 | #define ZED_SEPM0009_Not10 "~SEPM0009_Not10" | 258 | #define ZED_SEPM0009_Not10 "~SEPM0009_Not10" |
371 | 257 | #define ZED_SEPM0009_NotOmit "~SEPM0009_NotOmit" | 259 | #define ZED_SEPM0009_NotOmit "~SEPM0009_NotOmit" |
372 | 258 | #define ZED_SchemaOutOfMemory "~SchemaOutOfMemory" | ||
373 | 259 | #define ZED_SchemaParseError "~SchemaParseError" | ||
374 | 260 | #define ZED_SchemaUnexpected "~SchemaUnexpected" | 260 | #define ZED_SchemaUnexpected "~SchemaUnexpected" |
375 | 261 | #define ZED_SearchKeyTypeMismatch_234 "~SearchKeyTypeMismatch_234" | 261 | #define ZED_SearchKeyTypeMismatch_234 "~SearchKeyTypeMismatch_234" |
376 | 262 | #define ZED_SearchKeyTypeNoProbeIndex_23 "~SearchKeyTypeNoProbeIndex_23" | 262 | #define ZED_SearchKeyTypeNoProbeIndex_23 "~SearchKeyTypeNoProbeIndex_23" |
377 | 263 | 263 | ||
378 | === modified file 'src/types/schema/LoadSchemaErrorHandler.cpp' | |||
379 | --- src/types/schema/LoadSchemaErrorHandler.cpp 2012-09-19 21:16:15 +0000 | |||
380 | +++ src/types/schema/LoadSchemaErrorHandler.cpp 2013-02-08 02:57:22 +0000 | |||
381 | @@ -50,42 +50,30 @@ | |||
382 | 50 | // --------------------------------------------------------------------------- | 50 | // --------------------------------------------------------------------------- |
383 | 51 | void LoadSchemaErrorHandler::error(const XERCES_CPP_NAMESPACE::SAXParseException& e) | 51 | void LoadSchemaErrorHandler::error(const XERCES_CPP_NAMESPACE::SAXParseException& e) |
384 | 52 | { | 52 | { |
385 | 53 | zstring system_id, public_id; | ||
386 | 54 | if ( e.getSystemId() ) | ||
387 | 55 | system_id = StrX( e.getSystemId() ).localFormOrDefault( "" ); | ||
388 | 56 | if ( e.getPublicId() ) | ||
389 | 57 | public_id = StrX( e.getPublicId() ).localFormOrDefault( "" ); | ||
390 | 58 | |||
391 | 53 | theSawErrors = true; | 59 | theSawErrors = true; |
407 | 54 | std::ostringstream os; | 60 | throw XQUERY_EXCEPTION( |
408 | 55 | os << "Error in schema "; | 61 | err::XQST0059, |
409 | 56 | 62 | ERROR_PARAMS( | |
410 | 57 | if ( e.getSystemId() != NULL ) | 63 | ZED( XQST0059_XercesMessage ), |
411 | 58 | os << "with system id " << StrX(e.getSystemId()); | 64 | e.getLineNumber(), |
412 | 59 | else if ( e.getPublicId() != NULL ) | 65 | e.getColumnNumber(), |
413 | 60 | os << "with public id " << StrX(e.getPublicId()); | 66 | system_id, |
414 | 61 | else | 67 | public_id, |
415 | 62 | os << "without id"; | 68 | StrX( e.getMessage() ).localFormOrDefault( "" ) |
416 | 63 | 69 | ), | |
417 | 64 | os << ", line " << e.getLineNumber() | 70 | ERROR_LOC( theQueryLoc ) |
418 | 65 | << ", column " << e.getColumnNumber() << "." << std::endl | 71 | ); |
404 | 66 | << StrX(e.getMessage()); | ||
405 | 67 | |||
406 | 68 | throw XQUERY_EXCEPTION( err::XQST0059, ERROR_PARAMS(os.str()), ERROR_LOC(theQueryLoc) ); | ||
419 | 69 | } | 72 | } |
420 | 70 | 73 | ||
421 | 71 | void LoadSchemaErrorHandler::fatalError(const XERCES_CPP_NAMESPACE::SAXParseException& e) | 74 | void LoadSchemaErrorHandler::fatalError(const XERCES_CPP_NAMESPACE::SAXParseException& e) |
422 | 72 | { | 75 | { |
439 | 73 | theSawErrors = true; | 76 | error( e ); |
424 | 74 | std::ostringstream os; | ||
425 | 75 | os << "Fatal error in schema "; | ||
426 | 76 | |||
427 | 77 | if ( e.getSystemId() != NULL ) | ||
428 | 78 | os << "with system id " << StrX(e.getSystemId()); | ||
429 | 79 | else if ( e.getPublicId() != NULL ) | ||
430 | 80 | os << "with public id " << StrX(e.getPublicId()); | ||
431 | 81 | else | ||
432 | 82 | os << "without id"; | ||
433 | 83 | |||
434 | 84 | os << ", line " << e.getLineNumber() | ||
435 | 85 | << ", column " << e.getColumnNumber() << "." << std::endl | ||
436 | 86 | << StrX(e.getMessage()); | ||
437 | 87 | |||
438 | 88 | throw XQUERY_EXCEPTION( err::XQST0059, ERROR_PARAMS(os.str()), ERROR_LOC(theQueryLoc) ); | ||
440 | 89 | } | 77 | } |
441 | 90 | 78 | ||
442 | 91 | void LoadSchemaErrorHandler::warning(const XERCES_CPP_NAMESPACE::SAXParseException& e) | 79 | void LoadSchemaErrorHandler::warning(const XERCES_CPP_NAMESPACE::SAXParseException& e) |
443 | 92 | 80 | ||
444 | === modified file 'src/types/schema/schema.cpp' | |||
445 | --- src/types/schema/schema.cpp 2013-01-24 10:49:06 +0000 | |||
446 | +++ src/types/schema/schema.cpp 2013-02-08 02:57:22 +0000 | |||
447 | @@ -262,8 +262,13 @@ | |||
448 | 262 | else { | 262 | else { |
449 | 263 | // We didn't find it. If we return NULL here, Xerces will try to | 263 | // We didn't find it. If we return NULL here, Xerces will try to |
450 | 264 | // resolve it its own way, which we don't want to happen. | 264 | // resolve it its own way, which we don't want to happen. |
453 | 265 | throw XQUERY_EXCEPTION( err::XQST0059, | 265 | throw XQUERY_EXCEPTION( |
454 | 266 | ERROR_PARAMS( lResolved )); | 266 | err::XQST0059, |
455 | 267 | ERROR_PARAMS( | ||
456 | 268 | ZED( XQST0059_SpecificationMessage ), | ||
457 | 269 | lResolved | ||
458 | 270 | ) | ||
459 | 271 | ); | ||
460 | 267 | } | 272 | } |
461 | 268 | } | 273 | } |
462 | 269 | catch (ZorbaException const& e) { | 274 | catch (ZorbaException const& e) { |
463 | @@ -478,25 +483,31 @@ | |||
464 | 478 | } | 483 | } |
465 | 479 | catch (const OutOfMemoryException&) | 484 | catch (const OutOfMemoryException&) |
466 | 480 | { | 485 | { |
470 | 481 | throw XQUERY_EXCEPTION( err::XQST0059, | 486 | throw XQUERY_EXCEPTION( |
471 | 482 | ERROR_PARAMS( std::string(xsdURL), ZED( SchemaOutOfMemory )), | 487 | zerr::ZXQP0014_OUT_OF_MEMORY, |
472 | 483 | ERROR_LOC( loc ) ); | 488 | ERROR_PARAMS( xsdURL ), |
473 | 489 | ERROR_LOC( loc ) | ||
474 | 490 | ); | ||
475 | 484 | } | 491 | } |
476 | 485 | catch (const XMLException& e) | 492 | catch (const XMLException& e) |
477 | 486 | { | 493 | { |
481 | 487 | throw XQUERY_EXCEPTION( err::XQST0059, | 494 | throw XQUERY_EXCEPTION( |
482 | 488 | ERROR_PARAMS( std::string(xsdURL), ZED( SchemaParseError ), StrX(e.getMessage())), | 495 | zerr::ZXQP0033_SCHEMA_XML_ERROR, |
483 | 489 | ERROR_LOC( loc ) ); | 496 | ERROR_PARAMS( xsdURL, e.getMessage() ), |
484 | 497 | ERROR_LOC( loc ) | ||
485 | 498 | ); | ||
486 | 490 | } | 499 | } |
488 | 491 | catch (const ZorbaException& /* e */) | 500 | catch (const ZorbaException&) |
489 | 492 | { | 501 | { |
490 | 493 | throw; | 502 | throw; |
491 | 494 | } | 503 | } |
492 | 495 | catch (...) | 504 | catch (...) |
493 | 496 | { | 505 | { |
497 | 497 | throw XQUERY_EXCEPTION( err::XQST0059, | 506 | throw XQUERY_EXCEPTION( |
498 | 498 | ERROR_PARAMS( std::string(xsdURL), ZED( SchemaUnexpected )), | 507 | zerr::ZXQP0035_SCHEMA_UNEXPECTED_ERROR, |
499 | 499 | ERROR_LOC( loc ) ); | 508 | ERROR_PARAMS( xsdURL ), |
500 | 509 | ERROR_LOC( loc ) | ||
501 | 510 | ); | ||
502 | 500 | } | 511 | } |
503 | 501 | 512 | ||
504 | 502 | #ifdef DO_PRINT_SCHEMA_INFO | 513 | #ifdef DO_PRINT_SCHEMA_INFO |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ bug-867027- 2013-02- 08T00-17- 47.56Z/ log.html
Log at: http://