Merge lp:~zorba-coders/zorba/markos-scratch into lp:zorba
- markos-scratch
- Merge into trunk
Status: | Merged |
---|---|
Approved by: | Markos Zaharioudakis |
Approved revision: | 11008 |
Merged at revision: | 11180 |
Proposed branch: | lp:~zorba-coders/zorba/markos-scratch |
Merge into: | lp:zorba |
Diff against target: |
2677 lines (+606/-457) 14 files modified
src/api/base64impl.cpp (+11/-10) src/api/itemfactoryimpl.cpp (+38/-23) src/diagnostics/diagnostic_en.xml (+64/-30) src/diagnostics/pregenerated/dict_en.cpp (+17/-9) src/diagnostics/pregenerated/dict_zed_keys.h (+15/-7) src/runtime/qnames/qnames_impl.cpp (+19/-16) src/store/naive/atomic_items.cpp (+23/-11) src/store/naive/node_items.cpp (+1/-1) src/types/casting.cpp (+278/-182) src/types/schema/XercesParseUtils.cpp (+96/-128) src/types/schema/schema.cpp (+11/-9) src/zorbatypes/URI.cpp (+18/-14) src/zorbatypes/binary.cpp (+14/-16) test/rbkt/ExpQueryResults/zorba/trycatch/trycatch4.xml.res (+1/-1) |
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+142760@code.launchpad.net |
Commit message
fixed error messages for FORG0001 and FOCA0002 + removed uses of XQUERY_
Description of the change
fixed error messages for FORG0001 and FOCA0002 + removed uses of XQUERY_
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:
2 tests did not succeed - changes not commited.
Error in read script: /home/ceej/
- 11008. By Markos Zaharioudakis
-
fixed error messages for FORG0001 and FOCA0002 + removed uses of XQUERY_
EXCEPTION_ VAR macros
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 'src/api/base64impl.cpp' | |||
2 | --- src/api/base64impl.cpp 2012-09-19 21:16:15 +0000 | |||
3 | +++ src/api/base64impl.cpp 2013-01-11 00:47:24 +0000 | |||
4 | @@ -26,18 +26,19 @@ | |||
5 | 26 | #include "diagnostics/xquery_exception.h" | 26 | #include "diagnostics/xquery_exception.h" |
6 | 27 | #include "util/base64_util.h" | 27 | #include "util/base64_util.h" |
7 | 28 | 28 | ||
18 | 29 | #define CATCH_BASE64_EXCEPTION() \ | 29 | #define CATCH_BASE64_EXCEPTION() \ |
19 | 30 | catch ( base64::exception const &e ) { \ | 30 | catch (const base64::exception& e) \ |
20 | 31 | throw XQUERY_EXCEPTION( \ | 31 | { \ |
21 | 32 | err::FORG0001, ERROR_PARAMS( e.invalid_char(), ZED( Base64BadChar ) ) \ | 32 | throw XQUERY_EXCEPTION(err::FORG0001, \ |
22 | 33 | ); \ | 33 | ERROR_PARAMS(ZED(FORG0001_Base64BadChar_2), e.invalid_char())); \ |
23 | 34 | } \ | 34 | } \ |
24 | 35 | catch ( std::invalid_argument const& ) { \ | 35 | catch (const std::invalid_argument&) \ |
25 | 36 | throw XQUERY_EXCEPTION( \ | 36 | { \ |
26 | 37 | err::FORG0001, ERROR_PARAMS( "", ZED( Base64Multiple4 ) ) \ | 37 | throw XQUERY_EXCEPTION(err::FORG0001, \ |
27 | 38 | ); \ | 38 | ERROR_PARAMS(ZED(FORG0001_Base64Multiple4))); \ |
28 | 39 | } | 39 | } |
29 | 40 | 40 | ||
30 | 41 | |||
31 | 41 | namespace zorba { | 42 | namespace zorba { |
32 | 42 | namespace encoding { | 43 | namespace encoding { |
33 | 43 | 44 | ||
34 | 44 | 45 | ||
35 | === modified file 'src/api/itemfactoryimpl.cpp' | |||
36 | --- src/api/itemfactoryimpl.cpp 2012-10-08 12:09:36 +0000 | |||
37 | +++ src/api/itemfactoryimpl.cpp 2013-01-11 00:47:24 +0000 | |||
38 | @@ -16,21 +16,29 @@ | |||
39 | 16 | #include "stdafx.h" | 16 | #include "stdafx.h" |
40 | 17 | 17 | ||
41 | 18 | #define __STDC_LIMIT_MACROS | 18 | #define __STDC_LIMIT_MACROS |
42 | 19 | |||
43 | 19 | #include <zorba/item.h> | 20 | #include <zorba/item.h> |
44 | 20 | #include <zorba/zorba_string.h> | 21 | #include <zorba/zorba_string.h> |
45 | 22 | |||
46 | 21 | #include "diagnostics/xquery_diagnostics.h" | 23 | #include "diagnostics/xquery_diagnostics.h" |
47 | 24 | #include "diagnostics/util_macros.h" | ||
48 | 25 | |||
49 | 22 | #include "api/itemfactoryimpl.h" | 26 | #include "api/itemfactoryimpl.h" |
50 | 23 | 27 | ||
51 | 24 | #include "zorbatypes/duration.h" | 28 | #include "zorbatypes/duration.h" |
52 | 29 | |||
53 | 25 | #include "system/globalenv.h" | 30 | #include "system/globalenv.h" |
54 | 31 | |||
55 | 26 | #include "store/api/item_factory.h" | 32 | #include "store/api/item_factory.h" |
57 | 27 | #include <store/api/store.h> | 33 | #include "store/api/store.h" |
58 | 28 | #include "store/api/copymode.h" | 34 | #include "store/api/copymode.h" |
59 | 35 | #include "store/api/item.h" | ||
60 | 36 | |||
61 | 29 | #include "api/unmarshaller.h" | 37 | #include "api/unmarshaller.h" |
62 | 38 | |||
63 | 30 | #include "types/casting.h" | 39 | #include "types/casting.h" |
64 | 31 | 40 | ||
67 | 32 | #include "store/api/item.h" | 41 | #include "runtime/util/item_iterator.h" |
66 | 33 | #include <runtime/util/item_iterator.h> | ||
68 | 34 | 42 | ||
69 | 35 | 43 | ||
70 | 36 | namespace zorba { | 44 | namespace zorba { |
71 | @@ -112,14 +120,16 @@ | |||
72 | 112 | zstring const &lLocalname = Unmarshaller::getInternalString( aLocalname ); | 120 | zstring const &lLocalname = Unmarshaller::getInternalString( aLocalname ); |
73 | 113 | 121 | ||
74 | 114 | if (!GenericCast::instance()->castableToNCName(lLocalname.c_str())) | 122 | if (!GenericCast::instance()->castableToNCName(lLocalname.c_str())) |
78 | 115 | throw XQUERY_EXCEPTION( | 123 | { |
79 | 116 | err::FORG0001, ERROR_PARAMS( lLocalname, ZED( MustBeNCName ) ) | 124 | RAISE_ERROR_NO_LOC(err::FORG0001, |
80 | 117 | ); | 125 | ERROR_PARAMS(ZED(FORG0001_LocalNotNCName_2), lLocalname)); |
81 | 126 | } | ||
82 | 118 | 127 | ||
83 | 119 | if (lPrefix.size() && !GenericCast::instance()->castableToNCName(lPrefix.c_str())) | 128 | if (lPrefix.size() && !GenericCast::instance()->castableToNCName(lPrefix.c_str())) |
87 | 120 | throw XQUERY_EXCEPTION( | 129 | { |
88 | 121 | err::FORG0001, ERROR_PARAMS( lPrefix, ZED( MustBeNCName ) ) | 130 | RAISE_ERROR_NO_LOC(err::FORG0001, |
89 | 122 | ); | 131 | ERROR_PARAMS(ZED(FORG0001_PrefixNotNCName_2), lPrefix)); |
90 | 132 | } | ||
91 | 123 | 133 | ||
92 | 124 | store::Item_t lItem; | 134 | store::Item_t lItem; |
93 | 125 | theItemFactory->createQName(lItem, lNamespace, lPrefix, lLocalname); | 135 | theItemFactory->createQName(lItem, lNamespace, lPrefix, lLocalname); |
94 | @@ -135,44 +145,51 @@ | |||
95 | 135 | zstring const &lLocalname = Unmarshaller::getInternalString( aLocalname ); | 145 | zstring const &lLocalname = Unmarshaller::getInternalString( aLocalname ); |
96 | 136 | 146 | ||
97 | 137 | if (!GenericCast::instance()->castableToNCName(lLocalname.c_str())) | 147 | if (!GenericCast::instance()->castableToNCName(lLocalname.c_str())) |
101 | 138 | throw XQUERY_EXCEPTION( | 148 | { |
102 | 139 | err::FORG0001, ERROR_PARAMS( lLocalname, ZED( MustBeNCName ) ) | 149 | RAISE_ERROR_NO_LOC(err::FORG0001, |
103 | 140 | ); | 150 | ERROR_PARAMS(ZED(FORG0001_LocalNotNCName_2), lLocalname)); |
104 | 151 | } | ||
105 | 141 | 152 | ||
106 | 142 | store::Item_t lItem; | 153 | store::Item_t lItem; |
107 | 143 | theItemFactory->createQName(lItem, lNamespace, zstring(), lLocalname); | 154 | theItemFactory->createQName(lItem, lNamespace, zstring(), lLocalname); |
108 | 144 | return &*lItem; | 155 | return &*lItem; |
109 | 145 | } | 156 | } |
110 | 146 | 157 | ||
111 | 158 | |||
112 | 147 | Item | 159 | Item |
113 | 148 | ItemFactoryImpl::createQName(const String& aQNameString) | 160 | ItemFactoryImpl::createQName(const String& aQNameString) |
114 | 149 | { | 161 | { |
116 | 150 | zstring const &lQNameString = Unmarshaller::getInternalString( aQNameString ); | 162 | const zstring& lQNameString = Unmarshaller::getInternalString( aQNameString ); |
117 | 151 | store::Item_t lItem; | 163 | store::Item_t lItem; |
118 | 152 | 164 | ||
119 | 153 | size_t lOpen = lQNameString.find("{"); | 165 | size_t lOpen = lQNameString.find("{"); |
120 | 154 | size_t lClose = lQNameString.find("}"); | 166 | size_t lClose = lQNameString.find("}"); |
121 | 155 | 167 | ||
123 | 156 | if (lOpen == 0 && lClose != std::string::npos) { | 168 | if (lOpen == 0 && lClose != std::string::npos) |
124 | 169 | { | ||
125 | 157 | zstring const &lNamespace = lQNameString.substr(1, lClose - 1); | 170 | zstring const &lNamespace = lQNameString.substr(1, lClose - 1); |
126 | 158 | zstring const &lLocalname = lQNameString.substr(lClose+1); | 171 | zstring const &lLocalname = lQNameString.substr(lClose+1); |
127 | 159 | theItemFactory->createQName(lItem, lNamespace, zstring(), lLocalname); | 172 | theItemFactory->createQName(lItem, lNamespace, zstring(), lLocalname); |
128 | 173 | |||
129 | 160 | if (!GenericCast::instance()->castableToNCName(lLocalname.c_str())) | 174 | if (!GenericCast::instance()->castableToNCName(lLocalname.c_str())) |
133 | 161 | throw XQUERY_EXCEPTION( | 175 | { |
134 | 162 | err::FORG0001, ERROR_PARAMS( lLocalname, ZED( MustBeNCName ) ) | 176 | RAISE_ERROR_NO_LOC(err::FORG0001, |
135 | 163 | ); | 177 | ERROR_PARAMS(ZED(FORG0001_LocalNotNCName_2), lLocalname)); |
136 | 178 | } | ||
137 | 164 | } | 179 | } |
138 | 165 | return &*lItem; | 180 | return &*lItem; |
139 | 166 | } | 181 | } |
140 | 167 | 182 | ||
141 | 183 | |||
142 | 168 | Item ItemFactoryImpl::createNCName(const String& aValue) | 184 | Item ItemFactoryImpl::createNCName(const String& aValue) |
143 | 169 | { | 185 | { |
144 | 170 | zstring lString = Unmarshaller::getInternalString(aValue); | 186 | zstring lString = Unmarshaller::getInternalString(aValue); |
145 | 171 | 187 | ||
146 | 172 | if (!GenericCast::instance()->castableToNCName(lString.c_str())) | 188 | if (!GenericCast::instance()->castableToNCName(lString.c_str())) |
150 | 173 | throw XQUERY_EXCEPTION( | 189 | { |
151 | 174 | err::FORG0001, ERROR_PARAMS( lString, ZED( MustBeNCName ) ) | 190 | RAISE_ERROR_NO_LOC(err::FORG0001, |
152 | 175 | ); | 191 | ERROR_PARAMS(ZED(FORG0001_NameNotNCName_2), lString)); |
153 | 192 | } | ||
154 | 176 | 193 | ||
155 | 177 | store::Item_t lItem; | 194 | store::Item_t lItem; |
156 | 178 | theItemFactory->createNCName(lItem, lString); | 195 | theItemFactory->createNCName(lItem, lString); |
157 | @@ -191,9 +208,7 @@ | |||
158 | 191 | } | 208 | } |
159 | 192 | else | 209 | else |
160 | 193 | { | 210 | { |
164 | 194 | throw ZORBA_EXCEPTION( | 211 | throw ZORBA_EXCEPTION(zerr::ZSTR0040_TYPE_ERROR, ERROR_PARAMS(lMessage)); |
162 | 195 | zerr::ZSTR0040_TYPE_ERROR, ERROR_PARAMS( lMessage ) | ||
163 | 196 | ); | ||
165 | 197 | } | 212 | } |
166 | 198 | return &*lItem; | 213 | return &*lItem; |
167 | 199 | } | 214 | } |
168 | 200 | 215 | ||
169 | === modified file 'src/diagnostics/diagnostic_en.xml' | |||
170 | --- src/diagnostics/diagnostic_en.xml 2013-01-08 08:34:08 +0000 | |||
171 | +++ src/diagnostics/diagnostic_en.xml 2013-01-11 00:47:24 +0000 | |||
172 | @@ -455,6 +455,10 @@ | |||
173 | 455 | is of nonzero length and is not in the lexical space of \c xs:anyURI. | 455 | is of nonzero length and is not in the lexical space of \c xs:anyURI. |
174 | 456 | </comment> | 456 | </comment> |
175 | 457 | <value>${"1": }invalid URI literal${: 2}</value> | 457 | <value>${"1": }invalid URI literal${: 2}</value> |
176 | 458 | |||
177 | 459 | <entry key="BadHexDigit_3"> | ||
178 | 460 | <value>'$3': invalid hexedecimal digit</value> | ||
179 | 461 | </entry> | ||
180 | 458 | </diagnostic> | 462 | </diagnostic> |
181 | 459 | 463 | ||
182 | 460 | <diagnostic code="XQST0047"> | 464 | <diagnostic code="XQST0047"> |
183 | @@ -1020,7 +1024,20 @@ | |||
184 | 1020 | <comment> | 1024 | <comment> |
185 | 1021 | Invalid lexical value. | 1025 | Invalid lexical value. |
186 | 1022 | </comment> | 1026 | </comment> |
188 | 1023 | <value>"$1": invalid lexical value${: 2}</value> | 1027 | <value>$1</value> |
189 | 1028 | |||
190 | 1029 | <entry key="BadLexicalQName_2"> | ||
191 | 1030 | <value>"$2": value is not a valid lexical QName</value> | ||
192 | 1031 | </entry> | ||
193 | 1032 | |||
194 | 1033 | <entry key="NoURIforPrefix_2"> | ||
195 | 1034 | <value>no namespace URI provided for prefix in lexical QName "$2"</value> | ||
196 | 1035 | </entry> | ||
197 | 1036 | |||
198 | 1037 | <entry key="NoCastTo_234"> | ||
199 | 1038 | <value>"$2": value of type $3 is not castable to type $4</value> | ||
200 | 1039 | </entry> | ||
201 | 1040 | |||
202 | 1024 | </diagnostic> | 1041 | </diagnostic> |
203 | 1025 | 1042 | ||
204 | 1026 | <diagnostic code="FOCA0003"> | 1043 | <diagnostic code="FOCA0003"> |
205 | @@ -1188,7 +1205,52 @@ | |||
206 | 1188 | <comment> | 1205 | <comment> |
207 | 1189 | Invalid value for cast/constructor. | 1206 | Invalid value for cast/constructor. |
208 | 1190 | </comment> | 1207 | </comment> |
210 | 1191 | <value>${"1": }invalid value for cast/constructor${: 2}</value> | 1208 | |
211 | 1209 | <value>$1</value> | ||
212 | 1210 | |||
213 | 1211 | <entry key="NoCastTo_234"> | ||
214 | 1212 | <value>"$2": value of type $3 is not castable to type $4</value> | ||
215 | 1213 | </entry> | ||
216 | 1214 | |||
217 | 1215 | <entry key="NoCastTo_234o"> | ||
218 | 1216 | <value>"$2": value is not castable to type $3${: 4}</value> | ||
219 | 1217 | </entry> | ||
220 | 1218 | |||
221 | 1219 | <entry key="LocalNotNCName_2"> | ||
222 | 1220 | <value>"$2": local name in qname is not an xs:NCName</value> | ||
223 | 1221 | </entry> | ||
224 | 1222 | |||
225 | 1223 | <entry key="PrefixNotNCName_2"> | ||
226 | 1224 | <value>"$2": prefix in qname is not an xs:NCName</value> | ||
227 | 1225 | </entry> | ||
228 | 1226 | |||
229 | 1227 | <entry key="NameNotNCName_2"> | ||
230 | 1228 | <value>"$2": name is not an xs:NCName</value> | ||
231 | 1229 | </entry> | ||
232 | 1230 | |||
233 | 1231 | <entry key="PrefixNotBound_2"> | ||
234 | 1232 | <value>"$2": prefix has no known namespace binding</value> | ||
235 | 1233 | </entry> | ||
236 | 1234 | |||
237 | 1235 | <entry key="Base64BadChar_2"> | ||
238 | 1236 | <value>"$2": invalid Base64 character</value> | ||
239 | 1237 | </entry> | ||
240 | 1238 | |||
241 | 1239 | <entry key="Base64Multiple4"> | ||
242 | 1240 | <value>Base64 data must be a multiple of 4 characters</value> | ||
243 | 1241 | </entry> | ||
244 | 1242 | |||
245 | 1243 | <entry key="HexBinaryMustBeEven"> | ||
246 | 1244 | <value>HexBinary value must contain an even number of characters</value> | ||
247 | 1245 | </entry> | ||
248 | 1246 | |||
249 | 1247 | <entry key="BadHexDigit_2"> | ||
250 | 1248 | <value>'$2': invalid hexedecimal digit</value> | ||
251 | 1249 | </entry> | ||
252 | 1250 | |||
253 | 1251 | <entry key="NoTypeInCtx_2"> | ||
254 | 1252 | <value>"$2": type no defined in current context</value> | ||
255 | 1253 | </entry> | ||
256 | 1192 | </diagnostic> | 1254 | </diagnostic> |
257 | 1193 | 1255 | ||
258 | 1194 | <diagnostic code="FORG0002"> | 1256 | <diagnostic code="FORG0002"> |
259 | @@ -3029,10 +3091,6 @@ | |||
260 | 3029 | <value>"$2": invalid authority for "file" scheme</value> | 3091 | <value>"$2": invalid authority for "file" scheme</value> |
261 | 3030 | </entry> | 3092 | </entry> |
262 | 3031 | 3093 | ||
263 | 3032 | <entry key="BadHexDigit_3"> | ||
264 | 3033 | <value>'$3': invalid hexedecimal digit</value> | ||
265 | 3034 | </entry> | ||
266 | 3035 | |||
267 | 3036 | <entry key="BadHexSequence"> | 3094 | <entry key="BadHexSequence"> |
268 | 3037 | <value>invalid hexedecimal sequence</value> | 3095 | <value>invalid hexedecimal sequence</value> |
269 | 3038 | </entry> | 3096 | </entry> |
270 | @@ -3113,14 +3171,6 @@ | |||
271 | 3113 | <value>unsupported XQuery version</value> | 3171 | <value>unsupported XQuery version</value> |
272 | 3114 | </entry> | 3172 | </entry> |
273 | 3115 | 3173 | ||
274 | 3116 | <entry key="Base64BadChar"> | ||
275 | 3117 | <value>invalid Base64 character</value> | ||
276 | 3118 | </entry> | ||
277 | 3119 | |||
278 | 3120 | <entry key="Base64Multiple4"> | ||
279 | 3121 | <value>Base64 data must be a multiple of 4 characters</value> | ||
280 | 3122 | </entry> | ||
281 | 3123 | |||
282 | 3124 | <entry key="BaseURI"> | 3174 | <entry key="BaseURI"> |
283 | 3125 | <value>base URI</value> | 3175 | <value>base URI</value> |
284 | 3126 | </entry> | 3176 | </entry> |
285 | @@ -3129,10 +3179,6 @@ | |||
286 | 3129 | <value>box condition has more columns than index</value> | 3179 | <value>box condition has more columns than index</value> |
287 | 3130 | </entry> | 3180 | </entry> |
288 | 3131 | 3181 | ||
289 | 3132 | <entry key="CastFromToFailed_34"> | ||
290 | 3133 | <value>$3 to $4 cast failed</value> | ||
291 | 3134 | </entry> | ||
292 | 3135 | |||
293 | 3136 | <entry key="CharExpected_3"> | 3182 | <entry key="CharExpected_3"> |
294 | 3137 | <value>'$3' expected</value> | 3183 | <value>'$3' expected</value> |
295 | 3138 | </entry> | 3184 | </entry> |
296 | @@ -3285,10 +3331,6 @@ | |||
297 | 3285 | <value>valid values are: yes, no, omit</value> | 3331 | <value>valid values are: yes, no, omit</value> |
298 | 3286 | </entry> | 3332 | </entry> |
299 | 3287 | 3333 | ||
300 | 3288 | <entry key="HexBinaryMustBeEven"> | ||
301 | 3289 | <value>HexBinary value must contain an even number of characters</value> | ||
302 | 3290 | </entry> | ||
303 | 3291 | |||
304 | 3292 | <entry key="IncompleteKeyInIndexBuild"> | 3334 | <entry key="IncompleteKeyInIndexBuild"> |
305 | 3293 | <value>incomplete key during index build</value> | 3335 | <value>incomplete key during index build</value> |
306 | 3294 | </entry> | 3336 | </entry> |
307 | @@ -3309,10 +3351,6 @@ | |||
308 | 3309 | <value>must be absolute</value> | 3351 | <value>must be absolute</value> |
309 | 3310 | </entry> | 3352 | </entry> |
310 | 3311 | 3353 | ||
311 | 3312 | <entry key="MustBeNCName"> | ||
312 | 3313 | <value>must be an xs:NCName</value> | ||
313 | 3314 | </entry> | ||
314 | 3315 | |||
315 | 3316 | <entry key="NoAttrNodesInDocument"> | 3354 | <entry key="NoAttrNodesInDocument"> |
316 | 3317 | <value>document node must not contain attribute nodes</value> | 3355 | <value>document node must not contain attribute nodes</value> |
317 | 3318 | </entry> | 3356 | </entry> |
318 | @@ -3445,10 +3483,6 @@ | |||
319 | 3445 | <value>can not treat as "$4"</value> | 3483 | <value>can not treat as "$4"</value> |
320 | 3446 | </entry> | 3484 | </entry> |
321 | 3447 | 3485 | ||
322 | 3448 | <entry key="NoTypeInCtx"> | ||
323 | 3449 | <value>undefined type in current context</value> | ||
324 | 3450 | </entry> | ||
325 | 3451 | |||
326 | 3452 | <entry key="NoTypeInMainModule_4"> | 3486 | <entry key="NoTypeInMainModule_4"> |
327 | 3453 | <value>type of variable "$4" is not among the in-scope types of the main module</value> | 3487 | <value>type of variable "$4" is not among the in-scope types of the main module</value> |
328 | 3454 | </entry> | 3488 | </entry> |
329 | 3455 | 3489 | ||
330 | === modified file 'src/diagnostics/pregenerated/dict_en.cpp' | |||
331 | --- src/diagnostics/pregenerated/dict_en.cpp 2013-01-08 08:34:08 +0000 | |||
332 | +++ src/diagnostics/pregenerated/dict_en.cpp 2013-01-11 00:47:24 +0000 | |||
333 | @@ -31,7 +31,7 @@ | |||
334 | 31 | { "FOAR0001", "division by zero" }, | 31 | { "FOAR0001", "division by zero" }, |
335 | 32 | { "FOAR0002", "numeric operation overflow/underflow${: 1}" }, | 32 | { "FOAR0002", "numeric operation overflow/underflow${: 1}" }, |
336 | 33 | { "FOCA0001", "\"$1\": value too large for decimal" }, | 33 | { "FOCA0001", "\"$1\": value too large for decimal" }, |
338 | 34 | { "FOCA0002", "\"$1\": invalid lexical value${: 2}" }, | 34 | { "FOCA0002", "$1" }, |
339 | 35 | { "FOCA0003", "\"$1\": value too large for integer" }, | 35 | { "FOCA0003", "\"$1\": value too large for integer" }, |
340 | 36 | { "FOCA0005", "NaN supplied as float/double value" }, | 36 | { "FOCA0005", "NaN supplied as float/double value" }, |
341 | 37 | { "FOCA0006", "\"$1\": string to be cast to decimal has too many digits of precision" }, | 37 | { "FOCA0006", "\"$1\": string to be cast to decimal has too many digits of precision" }, |
342 | @@ -56,7 +56,7 @@ | |||
343 | 56 | { "FOFI0002", "invalid argument in format-integer: $1" }, | 56 | { "FOFI0002", "invalid argument in format-integer: $1" }, |
344 | 57 | { "FONS0004", "\"$1\": no namespace found for prefix" }, | 57 | { "FONS0004", "\"$1\": no namespace found for prefix" }, |
345 | 58 | { "FONS0005", "base-URI not defined in the static context" }, | 58 | { "FONS0005", "base-URI not defined in the static context" }, |
347 | 59 | { "FORG0001", "${\"1\": }invalid value for cast/constructor${: 2}" }, | 59 | { "FORG0001", "$1" }, |
348 | 60 | { "FORG0002", "\"$1\": invalid argument to fn:resolve-uri()${: 2}" }, | 60 | { "FORG0002", "\"$1\": invalid argument to fn:resolve-uri()${: 2}" }, |
349 | 61 | { "FORG0003", "fn:zero-or-one() called with a sequnce containing more than one item" }, | 61 | { "FORG0003", "fn:zero-or-one() called with a sequnce containing more than one item" }, |
350 | 62 | { "FORG0004", "fn:one-or-more() called with a sequence containing no items" }, | 62 | { "FORG0004", "fn:one-or-more() called with a sequence containing no items" }, |
351 | @@ -537,7 +537,6 @@ | |||
352 | 537 | { "~BadCharInBraces_3", "'$3': illegal character within { }" }, | 537 | { "~BadCharInBraces_3", "'$3': illegal character within { }" }, |
353 | 538 | { "~BadDecDigit_3", "'$3': invalid decimal digit" }, | 538 | { "~BadDecDigit_3", "'$3': invalid decimal digit" }, |
354 | 539 | { "~BadFileURIAuthority_2", "\"$2\": invalid authority for \"file\" scheme" }, | 539 | { "~BadFileURIAuthority_2", "\"$2\": invalid authority for \"file\" scheme" }, |
355 | 540 | { "~BadHexDigit_3", "'$3': invalid hexedecimal digit" }, | ||
356 | 541 | { "~BadHexSequence", "invalid hexedecimal sequence" }, | 540 | { "~BadHexSequence", "invalid hexedecimal sequence" }, |
357 | 542 | { "~BadItem", "invalid item" }, | 541 | { "~BadItem", "invalid item" }, |
358 | 543 | { "~BadIterator", "invalid iterator" }, | 542 | { "~BadIterator", "invalid iterator" }, |
359 | @@ -560,11 +559,8 @@ | |||
360 | 560 | { "~BadXMLForXQDoc_3", "can not parse as XML for xqdoc: $3" }, | 559 | { "~BadXMLForXQDoc_3", "can not parse as XML for xqdoc: $3" }, |
361 | 561 | { "~BadXMLNoOpeningTag", "closing tag without matching opening tag" }, | 560 | { "~BadXMLNoOpeningTag", "closing tag without matching opening tag" }, |
362 | 562 | { "~BadXQueryVersion", "unsupported XQuery version" }, | 561 | { "~BadXQueryVersion", "unsupported XQuery version" }, |
363 | 563 | { "~Base64BadChar", "invalid Base64 character" }, | ||
364 | 564 | { "~Base64Multiple4", "Base64 data must be a multiple of 4 characters" }, | ||
365 | 565 | { "~BaseURI", "base URI" }, | 562 | { "~BaseURI", "base URI" }, |
366 | 566 | { "~BoxCondTooManyColumns", "box condition has more columns than index" }, | 563 | { "~BoxCondTooManyColumns", "box condition has more columns than index" }, |
367 | 567 | { "~CastFromToFailed_34", "$3 to $4 cast failed" }, | ||
368 | 568 | { "~CharExpected_3", "'$3' expected" }, | 564 | { "~CharExpected_3", "'$3' expected" }, |
369 | 569 | { "~CloneNotImplemented", "clone() not implemented for expression" }, | 565 | { "~CloneNotImplemented", "clone() not implemented for expression" }, |
370 | 570 | { "~ClosingBraceWithoutOpen", "'}' encountered without '{' first" }, | 566 | { "~ClosingBraceWithoutOpen", "'}' encountered without '{' first" }, |
371 | @@ -592,6 +588,20 @@ | |||
372 | 592 | { "~ExprReturnsTooManyUpdateLists", "expression does not return a pending update list" }, | 588 | { "~ExprReturnsTooManyUpdateLists", "expression does not return a pending update list" }, |
373 | 593 | { "~ExternFnDeterministic", "only external functions may be declared deterministic" }, | 589 | { "~ExternFnDeterministic", "only external functions may be declared deterministic" }, |
374 | 594 | { "~ExternFnNondeterministic", "only external functions may be declared nondeterministic" }, | 590 | { "~ExternFnNondeterministic", "only external functions may be declared nondeterministic" }, |
375 | 591 | { "~FOCA0002_BadLexicalQName_2", "\"$2\": value is not a valid lexical QName" }, | ||
376 | 592 | { "~FOCA0002_NoCastTo_234", "\"$2\": value of type $3 is not castable to type $4" }, | ||
377 | 593 | { "~FOCA0002_NoURIforPrefix_2", "no namespace URI provided for prefix in lexical QName \"$2\"" }, | ||
378 | 594 | { "~FORG0001_BadHexDigit_2", "'$2': invalid hexedecimal digit" }, | ||
379 | 595 | { "~FORG0001_Base64BadChar_2", "\"$2\": invalid Base64 character" }, | ||
380 | 596 | { "~FORG0001_Base64Multiple4", "Base64 data must be a multiple of 4 characters" }, | ||
381 | 597 | { "~FORG0001_HexBinaryMustBeEven", "HexBinary value must contain an even number of characters" }, | ||
382 | 598 | { "~FORG0001_LocalNotNCName_2", "\"$2\": local name in qname is not an xs:NCName" }, | ||
383 | 599 | { "~FORG0001_NameNotNCName_2", "\"$2\": name is not an xs:NCName" }, | ||
384 | 600 | { "~FORG0001_NoCastTo_234", "\"$2\": value of type $3 is not castable to type $4" }, | ||
385 | 601 | { "~FORG0001_NoCastTo_234o", "\"$2\": value is not castable to type $3${: 4}" }, | ||
386 | 602 | { "~FORG0001_NoTypeInCtx_2", "\"$2\": type no defined in current context" }, | ||
387 | 603 | { "~FORG0001_PrefixNotBound_2", "\"$2\": prefix has no known namespace binding" }, | ||
388 | 604 | { "~FORG0001_PrefixNotNCName_2", "\"$2\": prefix in qname is not an xs:NCName" }, | ||
389 | 595 | { "~FTST0009_BadStemmerLang", "for current stemmer" }, | 605 | { "~FTST0009_BadStemmerLang", "for current stemmer" }, |
390 | 596 | { "~FTST0009_BadStopWordsLang", "for current stop words" }, | 606 | { "~FTST0009_BadStopWordsLang", "for current stop words" }, |
391 | 597 | { "~FTST0009_BadThesaurusLang", "for given thesaurus" }, | 607 | { "~FTST0009_BadThesaurusLang", "for given thesaurus" }, |
392 | @@ -614,7 +624,6 @@ | |||
393 | 614 | { "~GoodValuesAreXMLEtc", "valid values are: xml, html, xhtml, text, binary, json, jsoniq" }, | 624 | { "~GoodValuesAreXMLEtc", "valid values are: xml, html, xhtml, text, binary, json, jsoniq" }, |
394 | 615 | { "~GoodValuesAreYesNo", "valid values are: yes, no" }, | 625 | { "~GoodValuesAreYesNo", "valid values are: yes, no" }, |
395 | 616 | { "~GoodValuesAreYesNoOmit", "valid values are: yes, no, omit" }, | 626 | { "~GoodValuesAreYesNoOmit", "valid values are: yes, no, omit" }, |
396 | 617 | { "~HexBinaryMustBeEven", "HexBinary value must contain an even number of characters" }, | ||
397 | 618 | { "~IncompleteKeyInIndexBuild", "incomplete key during index build" }, | 627 | { "~IncompleteKeyInIndexBuild", "incomplete key during index build" }, |
398 | 619 | { "~IncompleteKeyInIndexRefresh", "incomplete key during index refresh" }, | 628 | { "~IncompleteKeyInIndexRefresh", "incomplete key during index refresh" }, |
399 | 620 | { "~JNDY0021_IllegalCharacter_2", "'$2': illegal JSON character" }, | 629 | { "~JNDY0021_IllegalCharacter_2", "'$2': illegal JSON character" }, |
400 | @@ -648,7 +657,6 @@ | |||
401 | 648 | { "~LibModVersionMismatch_3", "XQuery library version can not be imported by a $3 version module" }, | 657 | { "~LibModVersionMismatch_3", "XQuery library version can not be imported by a $3 version module" }, |
402 | 649 | { "~ModuleNotFound", "module not found" }, | 658 | { "~ModuleNotFound", "module not found" }, |
403 | 650 | { "~MustBeAbsoluteURI", "must be absolute" }, | 659 | { "~MustBeAbsoluteURI", "must be absolute" }, |
404 | 651 | { "~MustBeNCName", "must be an xs:NCName" }, | ||
405 | 652 | { "~NoAttrNodesInDocument", "document node must not contain attribute nodes" }, | 660 | { "~NoAttrNodesInDocument", "document node must not contain attribute nodes" }, |
406 | 653 | { "~NoBindURI", "namespace URI can not be bound to prefix" }, | 661 | { "~NoBindURI", "namespace URI can not be bound to prefix" }, |
407 | 654 | { "~NoCastToCInt_2", "\"$2\": 2nd operand can not be cast from \"xs:integer\" to C++ \"int\"" }, | 662 | { "~NoCastToCInt_2", "\"$2\": 2nd operand can not be cast from \"xs:integer\" to C++ \"int\"" }, |
408 | @@ -682,7 +690,6 @@ | |||
409 | 682 | { "~NoSerializationCallbackForTraceStream", "no SerializationCallback for required trace stream" }, | 690 | { "~NoSerializationCallbackForTraceStream", "no SerializationCallback for required trace stream" }, |
410 | 683 | { "~NoSourceURI", "no URI" }, | 691 | { "~NoSourceURI", "no URI" }, |
411 | 684 | { "~NoTreatAs_4", "can not treat as \"$4\"" }, | 692 | { "~NoTreatAs_4", "can not treat as \"$4\"" }, |
412 | 685 | { "~NoTypeInCtx", "undefined type in current context" }, | ||
413 | 686 | { "~NoTypeInMainModule_4", "type of variable \"$4\" is not among the in-scope types of the main module" }, | 693 | { "~NoTypeInMainModule_4", "type of variable \"$4\" is not among the in-scope types of the main module" }, |
414 | 687 | { "~NoTypeInModule_45", "type of variable \"$4\" is not among the in-scope types module \"$5\"" }, | 694 | { "~NoTypeInModule_45", "type of variable \"$4\" is not among the in-scope types module \"$5\"" }, |
415 | 688 | { "~NoURIAuthority", "no authority" }, | 695 | { "~NoURIAuthority", "no authority" }, |
416 | @@ -897,6 +904,7 @@ | |||
417 | 897 | { "~XPTY0004_NoTypePromote_23", "$2 can not be promoted to type $3" }, | 904 | { "~XPTY0004_NoTypePromote_23", "$2 can not be promoted to type $3" }, |
418 | 898 | { "~XPTY0117_NodeCast", "Cannot cast node to xs:QName" }, | 905 | { "~XPTY0117_NodeCast", "Cannot cast node to xs:QName" }, |
419 | 899 | { "~XPTY0117_NotationParam_23", "$2 can not be promoted to parameter type xs:NOTATION of function $3()" }, | 906 | { "~XPTY0117_NotationParam_23", "$2 can not be promoted to parameter type xs:NOTATION of function $3()" }, |
420 | 907 | { "~XQST0046_BadHexDigit_3", "'$3': invalid hexedecimal digit" }, | ||
421 | 900 | { "~XQST0106_CONFLICTING", "conflicting" }, | 908 | { "~XQST0106_CONFLICTING", "conflicting" }, |
422 | 901 | { "~XQST0106_THE_SAME", "the same" }, | 909 | { "~XQST0106_THE_SAME", "the same" }, |
423 | 902 | { "~XUDY0021_AttributeName", "\"$3\": attribute with the same name already exists" }, | 910 | { "~XUDY0021_AttributeName", "\"$3\": attribute with the same name already exists" }, |
424 | 903 | 911 | ||
425 | === modified file 'src/diagnostics/pregenerated/dict_zed_keys.h' | |||
426 | --- src/diagnostics/pregenerated/dict_zed_keys.h 2013-01-08 08:34:08 +0000 | |||
427 | +++ src/diagnostics/pregenerated/dict_zed_keys.h 2013-01-11 00:47:24 +0000 | |||
428 | @@ -46,6 +46,7 @@ | |||
429 | 46 | #define ZED_XPTY0004_MultiValuedGroupingKey "~XPTY0004_MultiValuedGroupingKey" | 46 | #define ZED_XPTY0004_MultiValuedGroupingKey "~XPTY0004_MultiValuedGroupingKey" |
430 | 47 | #define ZED_XPTY0117_NodeCast "~XPTY0117_NodeCast" | 47 | #define ZED_XPTY0117_NodeCast "~XPTY0117_NodeCast" |
431 | 48 | #define ZED_XPTY0117_NotationParam_23 "~XPTY0117_NotationParam_23" | 48 | #define ZED_XPTY0117_NotationParam_23 "~XPTY0117_NotationParam_23" |
432 | 49 | #define ZED_XQST0046_BadHexDigit_3 "~XQST0046_BadHexDigit_3" | ||
433 | 49 | #define ZED_XQST0106_THE_SAME "~XQST0106_THE_SAME" | 50 | #define ZED_XQST0106_THE_SAME "~XQST0106_THE_SAME" |
434 | 50 | #define ZED_XQST0106_CONFLICTING "~XQST0106_CONFLICTING" | 51 | #define ZED_XQST0106_CONFLICTING "~XQST0106_CONFLICTING" |
435 | 51 | #define ZED_XPDY0002_VariableHasNoValue_2 "~XPDY0002_VariableHasNoValue_2" | 52 | #define ZED_XPDY0002_VariableHasNoValue_2 "~XPDY0002_VariableHasNoValue_2" |
436 | @@ -55,6 +56,20 @@ | |||
437 | 55 | #define ZED_FTST0009_BadStemmerLang "~FTST0009_BadStemmerLang" | 56 | #define ZED_FTST0009_BadStemmerLang "~FTST0009_BadStemmerLang" |
438 | 56 | #define ZED_FTST0009_BadThesaurusLang "~FTST0009_BadThesaurusLang" | 57 | #define ZED_FTST0009_BadThesaurusLang "~FTST0009_BadThesaurusLang" |
439 | 57 | #define ZED_FTST0009_BadTokenizerLang "~FTST0009_BadTokenizerLang" | 58 | #define ZED_FTST0009_BadTokenizerLang "~FTST0009_BadTokenizerLang" |
440 | 59 | #define ZED_FOCA0002_BadLexicalQName_2 "~FOCA0002_BadLexicalQName_2" | ||
441 | 60 | #define ZED_FOCA0002_NoURIforPrefix_2 "~FOCA0002_NoURIforPrefix_2" | ||
442 | 61 | #define ZED_FOCA0002_NoCastTo_234 "~FOCA0002_NoCastTo_234" | ||
443 | 62 | #define ZED_FORG0001_NoCastTo_234 "~FORG0001_NoCastTo_234" | ||
444 | 63 | #define ZED_FORG0001_NoCastTo_234o "~FORG0001_NoCastTo_234o" | ||
445 | 64 | #define ZED_FORG0001_LocalNotNCName_2 "~FORG0001_LocalNotNCName_2" | ||
446 | 65 | #define ZED_FORG0001_PrefixNotNCName_2 "~FORG0001_PrefixNotNCName_2" | ||
447 | 66 | #define ZED_FORG0001_NameNotNCName_2 "~FORG0001_NameNotNCName_2" | ||
448 | 67 | #define ZED_FORG0001_PrefixNotBound_2 "~FORG0001_PrefixNotBound_2" | ||
449 | 68 | #define ZED_FORG0001_Base64BadChar_2 "~FORG0001_Base64BadChar_2" | ||
450 | 69 | #define ZED_FORG0001_Base64Multiple4 "~FORG0001_Base64Multiple4" | ||
451 | 70 | #define ZED_FORG0001_HexBinaryMustBeEven "~FORG0001_HexBinaryMustBeEven" | ||
452 | 71 | #define ZED_FORG0001_BadHexDigit_2 "~FORG0001_BadHexDigit_2" | ||
453 | 72 | #define ZED_FORG0001_NoTypeInCtx_2 "~FORG0001_NoTypeInCtx_2" | ||
454 | 58 | #define ZED_XUST0001_CONCAT "~XUST0001_CONCAT" | 73 | #define ZED_XUST0001_CONCAT "~XUST0001_CONCAT" |
455 | 59 | #define ZED_XUST0001_TRYCATCH "~XUST0001_TRYCATCH" | 74 | #define ZED_XUST0001_TRYCATCH "~XUST0001_TRYCATCH" |
456 | 60 | #define ZED_XUST0001_Generic "~XUST0001_Generic" | 75 | #define ZED_XUST0001_Generic "~XUST0001_Generic" |
457 | @@ -107,7 +122,6 @@ | |||
458 | 107 | #define ZED_BadCharInBraces_3 "~BadCharInBraces_3" | 122 | #define ZED_BadCharInBraces_3 "~BadCharInBraces_3" |
459 | 108 | #define ZED_BadDecDigit_3 "~BadDecDigit_3" | 123 | #define ZED_BadDecDigit_3 "~BadDecDigit_3" |
460 | 109 | #define ZED_BadFileURIAuthority_2 "~BadFileURIAuthority_2" | 124 | #define ZED_BadFileURIAuthority_2 "~BadFileURIAuthority_2" |
461 | 110 | #define ZED_BadHexDigit_3 "~BadHexDigit_3" | ||
462 | 111 | #define ZED_BadHexSequence "~BadHexSequence" | 125 | #define ZED_BadHexSequence "~BadHexSequence" |
463 | 112 | #define ZED_BadItem "~BadItem" | 126 | #define ZED_BadItem "~BadItem" |
464 | 113 | #define ZED_BadIterator "~BadIterator" | 127 | #define ZED_BadIterator "~BadIterator" |
465 | @@ -128,11 +142,8 @@ | |||
466 | 128 | #define ZED_BadXMLNoOpeningTag "~BadXMLNoOpeningTag" | 142 | #define ZED_BadXMLNoOpeningTag "~BadXMLNoOpeningTag" |
467 | 129 | #define ZED_BadXMLForXQDoc_3 "~BadXMLForXQDoc_3" | 143 | #define ZED_BadXMLForXQDoc_3 "~BadXMLForXQDoc_3" |
468 | 130 | #define ZED_BadXQueryVersion "~BadXQueryVersion" | 144 | #define ZED_BadXQueryVersion "~BadXQueryVersion" |
469 | 131 | #define ZED_Base64BadChar "~Base64BadChar" | ||
470 | 132 | #define ZED_Base64Multiple4 "~Base64Multiple4" | ||
471 | 133 | #define ZED_BaseURI "~BaseURI" | 145 | #define ZED_BaseURI "~BaseURI" |
472 | 134 | #define ZED_BoxCondTooManyColumns "~BoxCondTooManyColumns" | 146 | #define ZED_BoxCondTooManyColumns "~BoxCondTooManyColumns" |
473 | 135 | #define ZED_CastFromToFailed_34 "~CastFromToFailed_34" | ||
474 | 136 | #define ZED_CharExpected_3 "~CharExpected_3" | 147 | #define ZED_CharExpected_3 "~CharExpected_3" |
475 | 137 | #define ZED_CloneNotImplemented "~CloneNotImplemented" | 148 | #define ZED_CloneNotImplemented "~CloneNotImplemented" |
476 | 138 | #define ZED_ClosingBraceWithoutOpen "~ClosingBraceWithoutOpen" | 149 | #define ZED_ClosingBraceWithoutOpen "~ClosingBraceWithoutOpen" |
477 | @@ -171,13 +182,11 @@ | |||
478 | 171 | #define ZED_GoodValuesAreXMLEtc "~GoodValuesAreXMLEtc" | 182 | #define ZED_GoodValuesAreXMLEtc "~GoodValuesAreXMLEtc" |
479 | 172 | #define ZED_GoodValuesAreYesNo "~GoodValuesAreYesNo" | 183 | #define ZED_GoodValuesAreYesNo "~GoodValuesAreYesNo" |
480 | 173 | #define ZED_GoodValuesAreYesNoOmit "~GoodValuesAreYesNoOmit" | 184 | #define ZED_GoodValuesAreYesNoOmit "~GoodValuesAreYesNoOmit" |
481 | 174 | #define ZED_HexBinaryMustBeEven "~HexBinaryMustBeEven" | ||
482 | 175 | #define ZED_IncompleteKeyInIndexBuild "~IncompleteKeyInIndexBuild" | 185 | #define ZED_IncompleteKeyInIndexBuild "~IncompleteKeyInIndexBuild" |
483 | 176 | #define ZED_IncompleteKeyInIndexRefresh "~IncompleteKeyInIndexRefresh" | 186 | #define ZED_IncompleteKeyInIndexRefresh "~IncompleteKeyInIndexRefresh" |
484 | 177 | #define ZED_LibModVersionMismatch_3 "~LibModVersionMismatch_3" | 187 | #define ZED_LibModVersionMismatch_3 "~LibModVersionMismatch_3" |
485 | 178 | #define ZED_ModuleNotFound "~ModuleNotFound" | 188 | #define ZED_ModuleNotFound "~ModuleNotFound" |
486 | 179 | #define ZED_MustBeAbsoluteURI "~MustBeAbsoluteURI" | 189 | #define ZED_MustBeAbsoluteURI "~MustBeAbsoluteURI" |
487 | 180 | #define ZED_MustBeNCName "~MustBeNCName" | ||
488 | 181 | #define ZED_NoAttrNodesInDocument "~NoAttrNodesInDocument" | 190 | #define ZED_NoAttrNodesInDocument "~NoAttrNodesInDocument" |
489 | 182 | #define ZED_NoBindURI "~NoBindURI" | 191 | #define ZED_NoBindURI "~NoBindURI" |
490 | 183 | #define ZED_NoCastToCInt_2 "~NoCastToCInt_2" | 192 | #define ZED_NoCastToCInt_2 "~NoCastToCInt_2" |
491 | @@ -211,7 +220,6 @@ | |||
492 | 211 | #define ZED_NoSerializationCallbackForTraceStream "~NoSerializationCallbackForTraceStream" | 220 | #define ZED_NoSerializationCallbackForTraceStream "~NoSerializationCallbackForTraceStream" |
493 | 212 | #define ZED_NoSourceURI "~NoSourceURI" | 221 | #define ZED_NoSourceURI "~NoSourceURI" |
494 | 213 | #define ZED_NoTreatAs_4 "~NoTreatAs_4" | 222 | #define ZED_NoTreatAs_4 "~NoTreatAs_4" |
495 | 214 | #define ZED_NoTypeInCtx "~NoTypeInCtx" | ||
496 | 215 | #define ZED_NoTypeInMainModule_4 "~NoTypeInMainModule_4" | 223 | #define ZED_NoTypeInMainModule_4 "~NoTypeInMainModule_4" |
497 | 216 | #define ZED_NoTypeInModule_45 "~NoTypeInModule_45" | 224 | #define ZED_NoTypeInModule_45 "~NoTypeInModule_45" |
498 | 217 | #define ZED_NoURIAuthority "~NoURIAuthority" | 225 | #define ZED_NoURIAuthority "~NoURIAuthority" |
499 | 218 | 226 | ||
500 | === modified file 'src/runtime/qnames/qnames_impl.cpp' | |||
501 | --- src/runtime/qnames/qnames_impl.cpp 2012-09-19 21:16:15 +0000 | |||
502 | +++ src/runtime/qnames/qnames_impl.cpp 2013-01-11 00:47:24 +0000 | |||
503 | @@ -31,6 +31,8 @@ | |||
504 | 31 | #include "store/api/item_factory.h" | 31 | #include "store/api/item_factory.h" |
505 | 32 | #include "store/api/item.h" | 32 | #include "store/api/item.h" |
506 | 33 | 33 | ||
507 | 34 | #include "diagnostics/util_macros.h" | ||
508 | 35 | |||
509 | 34 | 36 | ||
510 | 35 | namespace zorba { | 37 | namespace zorba { |
511 | 36 | #define GENV_GCAST (*GenericCast::instance ()) | 38 | #define GENV_GCAST (*GenericCast::instance ()) |
512 | @@ -66,19 +68,22 @@ | |||
513 | 66 | resLocal = qname.substr(index+1, qname.size() - index); | 68 | resLocal = qname.substr(index+1, qname.size() - index); |
514 | 67 | 69 | ||
515 | 68 | // must check for FOCA0002 first | 70 | // must check for FOCA0002 first |
520 | 69 | if (!GENV_GCAST.castableToNCName(resPre) || ! GENV_GCAST.castableToNCName(resLocal)) | 71 | if (!GENV_GCAST.castableToNCName(resPre) || |
521 | 70 | throw XQUERY_EXCEPTION( | 72 | ! GENV_GCAST.castableToNCName(resLocal)) |
522 | 71 | err::FOCA0002, ERROR_PARAMS( qname ), ERROR_LOC(loc) | 73 | { |
523 | 72 | ); | 74 | RAISE_ERROR(err::FOCA0002, loc, |
524 | 75 | ERROR_PARAMS(ZED(FOCA0002_BadLexicalQName_2), qname)); | ||
525 | 76 | } | ||
526 | 73 | } | 77 | } |
527 | 74 | else | 78 | else |
528 | 75 | { | 79 | { |
529 | 76 | resLocal = qname; | 80 | resLocal = qname; |
530 | 77 | 81 | ||
531 | 78 | if (! GENV_GCAST.castableToNCName(resLocal)) | 82 | if (! GENV_GCAST.castableToNCName(resLocal)) |
535 | 79 | throw XQUERY_EXCEPTION( | 83 | { |
536 | 80 | err::FOCA0002, ERROR_PARAMS( qname ), ERROR_LOC(loc) | 84 | RAISE_ERROR(err::FOCA0002, loc, |
537 | 81 | ); | 85 | ERROR_PARAMS(ZED(FOCA0002_BadLexicalQName_2), qname)); |
538 | 86 | } | ||
539 | 82 | } | 87 | } |
540 | 83 | 88 | ||
541 | 84 | if (consumeNext(itemElem, theChild1, planState )) | 89 | if (consumeNext(itemElem, theChild1, planState )) |
542 | @@ -100,9 +105,7 @@ | |||
543 | 100 | } | 105 | } |
544 | 101 | 106 | ||
545 | 102 | if (!found && !resPre.empty()) | 107 | if (!found && !resPre.empty()) |
549 | 103 | throw XQUERY_EXCEPTION( | 108 | RAISE_ERROR(err::FONS0004, loc, ERROR_PARAMS(resPre)); |
547 | 104 | err::FONS0004, ERROR_PARAMS( resPre ), ERROR_LOC( loc ) | ||
548 | 105 | ); | ||
550 | 106 | } | 109 | } |
551 | 107 | 110 | ||
552 | 108 | GENV_ITEMFACTORY->createQName(result, resNs, resPre, resLocal); | 111 | GENV_ITEMFACTORY->createQName(result, resNs, resPre, resLocal); |
553 | @@ -146,9 +149,10 @@ | |||
554 | 146 | if (index != zstring::npos) | 149 | if (index != zstring::npos) |
555 | 147 | { | 150 | { |
556 | 148 | if (resNs.empty()) | 151 | if (resNs.empty()) |
560 | 149 | throw XQUERY_EXCEPTION( | 152 | { |
561 | 150 | err::FOCA0002, ERROR_PARAMS( resNs ), ERROR_LOC(loc) | 153 | RAISE_ERROR(err::FOCA0002, loc, |
562 | 151 | ); | 154 | ERROR_PARAMS(ZED(FOCA0002_NoURIforPrefix_2), qname)); |
563 | 155 | } | ||
564 | 152 | 156 | ||
565 | 153 | resPre = qname.substr(0, index); | 157 | resPre = qname.substr(0, index); |
566 | 154 | resLocal = qname.substr(index+1, qname.size() - index); | 158 | resLocal = qname.substr(index+1, qname.size() - index); |
567 | @@ -161,9 +165,8 @@ | |||
568 | 161 | if ((index != zstring::npos && ! GENV_GCAST.castableToNCName(resPre)) || | 165 | if ((index != zstring::npos && ! GENV_GCAST.castableToNCName(resPre)) || |
569 | 162 | ! GENV_GCAST.castableToNCName(resLocal)) | 166 | ! GENV_GCAST.castableToNCName(resLocal)) |
570 | 163 | { | 167 | { |
574 | 164 | throw XQUERY_EXCEPTION( | 168 | RAISE_ERROR(err::FOCA0002, loc, |
575 | 165 | err::FOCA0002, ERROR_PARAMS( qname ), ERROR_LOC(loc) | 169 | ERROR_PARAMS(ZED(FOCA0002_BadLexicalQName_2), qname)); |
573 | 166 | ); | ||
576 | 167 | } | 170 | } |
577 | 168 | 171 | ||
578 | 169 | GENV_ITEMFACTORY->createQName(result, resNs, resPre, resLocal); | 172 | GENV_ITEMFACTORY->createQName(result, resNs, resPre, resLocal); |
579 | 170 | 173 | ||
580 | === modified file 'src/store/naive/atomic_items.cpp' | |||
581 | --- src/store/naive/atomic_items.cpp 2012-12-25 20:27:54 +0000 | |||
582 | +++ src/store/naive/atomic_items.cpp 2013-01-11 00:47:24 +0000 | |||
583 | @@ -2679,7 +2679,10 @@ | |||
584 | 2679 | catch ( std::range_error const& ) | 2679 | catch ( std::range_error const& ) |
585 | 2680 | { | 2680 | { |
586 | 2681 | RAISE_ERROR_NO_LOC(err::FORG0001, | 2681 | RAISE_ERROR_NO_LOC(err::FORG0001, |
588 | 2682 | ERROR_PARAMS(theValue, ZED(CastFromToFailed_34), "integer", "long")); | 2682 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234), |
589 | 2683 | getStringValue(), | ||
590 | 2684 | "xs:integer", | ||
591 | 2685 | "xs:long")); | ||
592 | 2683 | } | 2686 | } |
593 | 2684 | } | 2687 | } |
594 | 2685 | 2688 | ||
595 | @@ -2693,7 +2696,10 @@ | |||
596 | 2693 | catch ( std::range_error const& ) | 2696 | catch ( std::range_error const& ) |
597 | 2694 | { | 2697 | { |
598 | 2695 | RAISE_ERROR_NO_LOC(err::FORG0001, | 2698 | RAISE_ERROR_NO_LOC(err::FORG0001, |
600 | 2696 | ERROR_PARAMS(theValue, ZED(CastFromToFailed_34), "integer", "unsignedInt")); | 2699 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234), |
601 | 2700 | getStringValue(), | ||
602 | 2701 | "xs:integer", | ||
603 | 2702 | "xs:unsignedInt")); | ||
604 | 2697 | } | 2703 | } |
605 | 2698 | } | 2704 | } |
606 | 2699 | 2705 | ||
607 | @@ -2793,10 +2799,11 @@ | |||
608 | 2793 | } | 2799 | } |
609 | 2794 | catch ( std::range_error const& ) | 2800 | catch ( std::range_error const& ) |
610 | 2795 | { | 2801 | { |
615 | 2796 | throw XQUERY_EXCEPTION( | 2802 | RAISE_ERROR_NO_LOC(err::FORG0001, |
616 | 2797 | err::FORG0001, | 2803 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234), |
617 | 2798 | ERROR_PARAMS( theValue, ZED( CastFromToFailed_34 ), "integer", "long" ) | 2804 | getStringValue(), |
618 | 2799 | ); | 2805 | "xs:nonPositiveInteger", |
619 | 2806 | "xs:long")); | ||
620 | 2800 | } | 2807 | } |
621 | 2801 | } | 2808 | } |
622 | 2802 | 2809 | ||
623 | @@ -2882,6 +2889,7 @@ | |||
624 | 2882 | } | 2889 | } |
625 | 2883 | } | 2890 | } |
626 | 2884 | 2891 | ||
627 | 2892 | |||
628 | 2885 | store::Item* NonNegativeIntegerItem::getType() const | 2893 | store::Item* NonNegativeIntegerItem::getType() const |
629 | 2886 | { | 2894 | { |
630 | 2887 | return GET_STORE().theSchemaTypeNames[store::XS_NON_NEGATIVE_INTEGER]; | 2895 | return GET_STORE().theSchemaTypeNames[store::XS_NON_NEGATIVE_INTEGER]; |
631 | @@ -2893,26 +2901,30 @@ | |||
632 | 2893 | return xs_decimal(theValue); | 2901 | return xs_decimal(theValue); |
633 | 2894 | } | 2902 | } |
634 | 2895 | 2903 | ||
635 | 2904 | |||
636 | 2896 | xs_integer NonNegativeIntegerItem::getIntegerValue() const | 2905 | xs_integer NonNegativeIntegerItem::getIntegerValue() const |
637 | 2897 | { | 2906 | { |
638 | 2898 | return xs_integer(theValue); | 2907 | return xs_integer(theValue); |
639 | 2899 | } | 2908 | } |
640 | 2900 | 2909 | ||
641 | 2910 | |||
642 | 2901 | xs_long NonNegativeIntegerItem::getLongValue() const | 2911 | xs_long NonNegativeIntegerItem::getLongValue() const |
643 | 2902 | { | 2912 | { |
644 | 2903 | try | 2913 | try |
645 | 2904 | { | 2914 | { |
646 | 2905 | return to_xs_long(theValue); | 2915 | return to_xs_long(theValue); |
647 | 2906 | } | 2916 | } |
649 | 2907 | catch ( std::range_error const& ) | 2917 | catch (const std::range_error& ) |
650 | 2908 | { | 2918 | { |
655 | 2909 | throw XQUERY_EXCEPTION( | 2919 | RAISE_ERROR_NO_LOC(err::FORG0001, |
656 | 2910 | err::FORG0001, | 2920 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234), |
657 | 2911 | ERROR_PARAMS( theValue, ZED( CastFromToFailed_34 ), "integer", "long" ) | 2921 | getStringValue(), |
658 | 2912 | ); | 2922 | "xs:nonNegativeInteger", |
659 | 2923 | "xs:long")); | ||
660 | 2913 | } | 2924 | } |
661 | 2914 | } | 2925 | } |
662 | 2915 | 2926 | ||
663 | 2927 | |||
664 | 2916 | zstring NonNegativeIntegerItem::getStringValue() const | 2928 | zstring NonNegativeIntegerItem::getStringValue() const |
665 | 2917 | { | 2929 | { |
666 | 2918 | return theValue.toString(); | 2930 | return theValue.toString(); |
667 | 2919 | 2931 | ||
668 | === modified file 'src/store/naive/node_items.cpp' | |||
669 | --- src/store/naive/node_items.cpp 2013-01-08 08:34:08 +0000 | |||
670 | +++ src/store/naive/node_items.cpp 2013-01-11 00:47:24 +0000 | |||
671 | @@ -3333,7 +3333,7 @@ | |||
672 | 3333 | if (!otherAttr->isHidden() && otherAttr->getNodeName()->equals(attrName)) | 3333 | if (!otherAttr->isHidden() && otherAttr->getNodeName()->equals(attrName)) |
673 | 3334 | { | 3334 | { |
674 | 3335 | throw XQUERY_EXCEPTION(err::XUDY0021, | 3335 | throw XQUERY_EXCEPTION(err::XUDY0021, |
676 | 3336 | ERROR_PARAMS(ZED(XUDY0021_AttributeName), "", attrName->getStringValue())); | 3336 | ERROR_PARAMS(ZED(XUDY0021_AttributeName), "", attrName->getStringValue())); |
677 | 3337 | } | 3337 | } |
678 | 3338 | } | 3338 | } |
679 | 3339 | } | 3339 | } |
680 | 3340 | 3340 | ||
681 | === modified file 'src/types/casting.cpp' | |||
682 | --- src/types/casting.cpp 2013-01-10 13:14:51 +0000 | |||
683 | +++ src/types/casting.cpp 2013-01-11 00:47:24 +0000 | |||
684 | @@ -96,29 +96,89 @@ | |||
685 | 96 | }; | 96 | }; |
686 | 97 | 97 | ||
687 | 98 | 98 | ||
711 | 99 | void throwTypeException(const Diagnostic& errcode, const ErrorInfo& info) | 99 | void throwXPTY0004Exception(const ErrorInfo& info) |
712 | 100 | { | 100 | { |
713 | 101 | if (info.theSourceType) | 101 | if (info.theSourceType) |
714 | 102 | { | 102 | { |
715 | 103 | throw XQUERY_EXCEPTION_VAR(errcode, | 103 | RAISE_ERROR(err::XPTY0004, info.theLoc, |
716 | 104 | ERROR_PARAMS(*info.theSourceType, ZED(NoCastTo_34o), *info.theTargetType), | 104 | ERROR_PARAMS(*info.theSourceType, ZED(NoCastTo_34o), *info.theTargetType)); |
717 | 105 | ERROR_LOC(info.theLoc)); | 105 | } |
718 | 106 | } | 106 | else |
719 | 107 | else | 107 | { |
720 | 108 | { | 108 | TypeManager& tm = GENV_TYPESYSTEM; |
721 | 109 | TypeManager& tm = GENV_TYPESYSTEM; | 109 | |
722 | 110 | 110 | xqtref_t sourceType = | |
723 | 111 | xqtref_t sourceType = | 111 | tm.create_builtin_atomic_type(info.theSourceTypeCode, |
724 | 112 | tm.create_builtin_atomic_type(info.theSourceTypeCode, | 112 | TypeConstants::QUANT_ONE); |
725 | 113 | TypeConstants::QUANT_ONE); | 113 | |
726 | 114 | 114 | xqtref_t targetType = | |
727 | 115 | xqtref_t targetType = | 115 | tm.create_builtin_atomic_type(info.theTargetTypeCode, |
728 | 116 | tm.create_builtin_atomic_type(info.theTargetTypeCode, | 116 | TypeConstants::QUANT_ONE); |
729 | 117 | TypeConstants::QUANT_ONE); | 117 | |
730 | 118 | 118 | RAISE_ERROR(err::XPTY0004, info.theLoc, | |
731 | 119 | throw XQUERY_EXCEPTION_VAR(errcode, | 119 | ERROR_PARAMS(*sourceType, ZED(NoCastTo_34o), *targetType)); |
732 | 120 | ERROR_PARAMS(*sourceType, ZED(NoCastTo_34o), *targetType), | 120 | } |
733 | 121 | ERROR_LOC(info.theLoc)); | 121 | } |
734 | 122 | |||
735 | 123 | |||
736 | 124 | void throwFOCA0002Exception(const zstring& str, const ErrorInfo& info) | ||
737 | 125 | { | ||
738 | 126 | if (info.theSourceType) | ||
739 | 127 | { | ||
740 | 128 | RAISE_ERROR(err::FOCA0002, info.theLoc, | ||
741 | 129 | ERROR_PARAMS(ZED(FOCA0002_NoCastTo_234), | ||
742 | 130 | str, | ||
743 | 131 | info.theSourceType->toSchemaString(), | ||
744 | 132 | info.theTargetType->toSchemaString())); | ||
745 | 133 | } | ||
746 | 134 | else | ||
747 | 135 | { | ||
748 | 136 | TypeManager& tm = GENV_TYPESYSTEM; | ||
749 | 137 | |||
750 | 138 | xqtref_t sourceType = | ||
751 | 139 | tm.create_builtin_atomic_type(info.theSourceTypeCode, | ||
752 | 140 | TypeConstants::QUANT_ONE); | ||
753 | 141 | |||
754 | 142 | xqtref_t targetType = | ||
755 | 143 | tm.create_builtin_atomic_type(info.theTargetTypeCode, | ||
756 | 144 | TypeConstants::QUANT_ONE); | ||
757 | 145 | |||
758 | 146 | RAISE_ERROR(err::FOCA0002, info.theLoc, | ||
759 | 147 | ERROR_PARAMS(ZED(FOCA0002_NoCastTo_234), | ||
760 | 148 | str, | ||
761 | 149 | sourceType->toSchemaString(), | ||
762 | 150 | targetType->toSchemaString())); | ||
763 | 151 | } | ||
764 | 152 | } | ||
765 | 153 | |||
766 | 154 | |||
767 | 155 | void throwFORG0001Exception(const zstring& str, const ErrorInfo& info) | ||
768 | 156 | { | ||
769 | 157 | if (info.theTargetType) | ||
770 | 158 | { | ||
771 | 159 | RAISE_ERROR(err::FORG0001, info.theLoc, | ||
772 | 160 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234), | ||
773 | 161 | str, | ||
774 | 162 | info.theSourceType->toSchemaString(), | ||
775 | 163 | info.theTargetType->toSchemaString())); | ||
776 | 164 | } | ||
777 | 165 | else | ||
778 | 166 | { | ||
779 | 167 | TypeManager& tm = GENV_TYPESYSTEM; | ||
780 | 168 | |||
781 | 169 | xqtref_t sourceType = | ||
782 | 170 | tm.create_builtin_atomic_type(info.theSourceTypeCode, | ||
783 | 171 | TypeConstants::QUANT_ONE); | ||
784 | 172 | |||
785 | 173 | xqtref_t targetType = | ||
786 | 174 | tm.create_builtin_atomic_type(info.theTargetTypeCode, | ||
787 | 175 | TypeConstants::QUANT_ONE); | ||
788 | 176 | |||
789 | 177 | RAISE_ERROR(err::FORG0001, info.theLoc, | ||
790 | 178 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234), | ||
791 | 179 | str, | ||
792 | 180 | sourceType->toSchemaString(), | ||
793 | 181 | targetType->toSchemaString())); | ||
794 | 122 | } | 182 | } |
795 | 123 | } | 183 | } |
796 | 124 | 184 | ||
797 | @@ -134,7 +194,7 @@ | |||
798 | 134 | zstring& strval, \ | 194 | zstring& strval, \ |
799 | 135 | store::ItemFactory*, \ | 195 | store::ItemFactory*, \ |
800 | 136 | const namespace_context* nsCtx, \ | 196 | const namespace_context* nsCtx, \ |
802 | 137 | const ErrorInfo& aErrorInfo) \ | 197 | const ErrorInfo& errInfo) \ |
803 | 138 | { \ | 198 | { \ |
804 | 139 | result = (aItem); \ | 199 | result = (aItem); \ |
805 | 140 | } \ | 200 | } \ |
806 | @@ -175,7 +235,7 @@ | |||
807 | 175 | zstring& strval, \ | 235 | zstring& strval, \ |
808 | 176 | store::ItemFactory* aFactory, \ | 236 | store::ItemFactory* aFactory, \ |
809 | 177 | const namespace_context* nsCtx, \ | 237 | const namespace_context* nsCtx, \ |
811 | 178 | const ErrorInfo& aErrorInfo) \ | 238 | const ErrorInfo& errInfo) \ |
812 | 179 | 239 | ||
813 | 180 | 240 | ||
814 | 181 | 241 | ||
815 | @@ -194,11 +254,11 @@ | |||
816 | 194 | } | 254 | } |
817 | 195 | catch (std::invalid_argument const&) | 255 | catch (std::invalid_argument const&) |
818 | 196 | { | 256 | { |
820 | 197 | throwTypeException(err::FORG0001, aErrorInfo); | 257 | throwFORG0001Exception(strval, errInfo); |
821 | 198 | } | 258 | } |
823 | 199 | catch ( std::range_error const& ) | 259 | catch (const std::range_error& ) |
824 | 200 | { | 260 | { |
826 | 201 | throw XQUERY_EXCEPTION(err::FOAR0002, ERROR_PARAMS(strval)); | 261 | RAISE_ERROR(err::FOAR0002, errInfo.theLoc, ERROR_PARAMS(strval)); |
827 | 202 | } | 262 | } |
828 | 203 | } | 263 | } |
829 | 204 | 264 | ||
830 | @@ -212,11 +272,11 @@ | |||
831 | 212 | } | 272 | } |
832 | 213 | catch (std::invalid_argument const& ) | 273 | catch (std::invalid_argument const& ) |
833 | 214 | { | 274 | { |
835 | 215 | throwTypeException(err::FORG0001, aErrorInfo); | 275 | throwFORG0001Exception(strval, errInfo); |
836 | 216 | } | 276 | } |
838 | 217 | catch (std::range_error const& ) | 277 | catch (const std::range_error& ) |
839 | 218 | { | 278 | { |
841 | 219 | throw XQUERY_EXCEPTION(err::FOAR0002, ERROR_PARAMS(strval)); | 279 | RAISE_ERROR(err::FOAR0002, errInfo.theLoc, ERROR_PARAMS(strval)); |
842 | 220 | } | 280 | } |
843 | 221 | } | 281 | } |
844 | 222 | 282 | ||
845 | @@ -228,9 +288,9 @@ | |||
846 | 228 | xs_decimal const n(strval.c_str()); | 288 | xs_decimal const n(strval.c_str()); |
847 | 229 | aFactory->createDecimal(result, n); | 289 | aFactory->createDecimal(result, n); |
848 | 230 | } | 290 | } |
850 | 231 | catch ( std::exception const& ) | 291 | catch (const std::exception& ) |
851 | 232 | { | 292 | { |
853 | 233 | throwTypeException( err::FORG0001, aErrorInfo ); | 293 | throwFORG0001Exception(strval, errInfo); |
854 | 234 | } | 294 | } |
855 | 235 | } | 295 | } |
856 | 236 | 296 | ||
857 | @@ -242,13 +302,31 @@ | |||
858 | 242 | xs_integer const n(strval.c_str()); | 302 | xs_integer const n(strval.c_str()); |
859 | 243 | aFactory->createInteger(result, n); | 303 | aFactory->createInteger(result, n); |
860 | 244 | } | 304 | } |
868 | 245 | catch ( std::invalid_argument const& ) | 305 | catch (const std::invalid_argument& ) |
869 | 246 | { | 306 | { |
870 | 247 | throwTypeException( err::FORG0001, aErrorInfo ); | 307 | throwFORG0001Exception(strval, errInfo); |
871 | 248 | } | 308 | } |
872 | 249 | catch ( std::range_error const& ) | 309 | catch (const std::range_error& ) |
873 | 250 | { | 310 | { |
874 | 251 | throwTypeException( err::FOAR0002, aErrorInfo ); | 311 | RAISE_ERROR(err::FOAR0002, errInfo.theLoc, ERROR_PARAMS(strval)); |
875 | 312 | } | ||
876 | 313 | } | ||
877 | 314 | |||
878 | 315 | |||
879 | 316 | T1_TO_T2(str, uint) | ||
880 | 317 | { | ||
881 | 318 | try | ||
882 | 319 | { | ||
883 | 320 | const xs_nonNegativeInteger n(strval.c_str()); | ||
884 | 321 | aFactory->createNonNegativeInteger(result, n); | ||
885 | 322 | } | ||
886 | 323 | catch (const std::invalid_argument& ) | ||
887 | 324 | { | ||
888 | 325 | throwFORG0001Exception(strval, errInfo); | ||
889 | 326 | } | ||
890 | 327 | catch (const std::range_error& ) | ||
891 | 328 | { | ||
892 | 329 | RAISE_ERROR(err::FOAR0002, errInfo.theLoc, ERROR_PARAMS(strval)); | ||
893 | 252 | } | 330 | } |
894 | 253 | } | 331 | } |
895 | 254 | 332 | ||
896 | @@ -263,7 +341,8 @@ | |||
897 | 263 | aFactory->createDuration(result, &d); | 341 | aFactory->createDuration(result, &d); |
898 | 264 | return; | 342 | return; |
899 | 265 | } | 343 | } |
901 | 266 | throwTypeException(err::FORG0001, aErrorInfo); | 344 | |
902 | 345 | throwFORG0001Exception(strval, errInfo); | ||
903 | 267 | } | 346 | } |
904 | 268 | 347 | ||
905 | 269 | 348 | ||
906 | @@ -277,7 +356,8 @@ | |||
907 | 277 | aFactory->createYearMonthDuration(result, &d); | 356 | aFactory->createYearMonthDuration(result, &d); |
908 | 278 | return; | 357 | return; |
909 | 279 | } | 358 | } |
911 | 280 | throwTypeException( err::FORG0001, aErrorInfo ); | 359 | |
912 | 360 | throwFORG0001Exception(strval, errInfo); | ||
913 | 281 | } | 361 | } |
914 | 282 | 362 | ||
915 | 283 | 363 | ||
916 | @@ -291,7 +371,8 @@ | |||
917 | 291 | aFactory->createDayTimeDuration(result, &d); | 371 | aFactory->createDayTimeDuration(result, &d); |
918 | 292 | return; | 372 | return; |
919 | 293 | } | 373 | } |
921 | 294 | throwTypeException( err::FORG0001, aErrorInfo ); | 374 | |
922 | 375 | throwFORG0001Exception(strval, errInfo); | ||
923 | 295 | } | 376 | } |
924 | 296 | 377 | ||
925 | 297 | 378 | ||
926 | @@ -303,7 +384,8 @@ | |||
927 | 303 | aFactory->createDateTime(result, &dt); | 384 | aFactory->createDateTime(result, &dt); |
928 | 304 | return; | 385 | return; |
929 | 305 | } | 386 | } |
931 | 306 | throwTypeException( err::FORG0001, aErrorInfo ); | 387 | |
932 | 388 | throwFORG0001Exception(strval, errInfo); | ||
933 | 307 | } | 389 | } |
934 | 308 | 390 | ||
935 | 309 | 391 | ||
936 | @@ -315,7 +397,8 @@ | |||
937 | 315 | aFactory->createTime(result, &t); | 397 | aFactory->createTime(result, &t); |
938 | 316 | return; | 398 | return; |
939 | 317 | } | 399 | } |
941 | 318 | throwTypeException( err::FORG0001, aErrorInfo ); | 400 | |
942 | 401 | throwFORG0001Exception(strval, errInfo); | ||
943 | 319 | } | 402 | } |
944 | 320 | 403 | ||
945 | 321 | 404 | ||
946 | @@ -327,7 +410,8 @@ | |||
947 | 327 | aFactory->createDate(result, &d); | 410 | aFactory->createDate(result, &d); |
948 | 328 | return; | 411 | return; |
949 | 329 | } | 412 | } |
951 | 330 | throwTypeException( err::FORG0001, aErrorInfo ); | 413 | |
952 | 414 | throwFORG0001Exception(strval, errInfo); | ||
953 | 331 | } | 415 | } |
954 | 332 | 416 | ||
955 | 333 | 417 | ||
956 | @@ -339,7 +423,8 @@ | |||
957 | 339 | aFactory->createGYearMonth(result, &ym); | 423 | aFactory->createGYearMonth(result, &ym); |
958 | 340 | return; | 424 | return; |
959 | 341 | } | 425 | } |
961 | 342 | throwTypeException( err::FORG0001, aErrorInfo ); | 426 | |
962 | 427 | throwFORG0001Exception(strval, errInfo); | ||
963 | 343 | } | 428 | } |
964 | 344 | 429 | ||
965 | 345 | 430 | ||
966 | @@ -351,7 +436,8 @@ | |||
967 | 351 | aFactory->createGYear(result, &y); | 436 | aFactory->createGYear(result, &y); |
968 | 352 | return; | 437 | return; |
969 | 353 | } | 438 | } |
971 | 354 | throwTypeException( err::FORG0001, aErrorInfo ); | 439 | |
972 | 440 | throwFORG0001Exception(strval, errInfo); | ||
973 | 355 | } | 441 | } |
974 | 356 | 442 | ||
975 | 357 | 443 | ||
976 | @@ -364,7 +450,7 @@ | |||
977 | 364 | return; | 450 | return; |
978 | 365 | } | 451 | } |
979 | 366 | 452 | ||
981 | 367 | throwTypeException( err::FORG0001, aErrorInfo ); | 453 | throwFORG0001Exception(strval, errInfo); |
982 | 368 | } | 454 | } |
983 | 369 | 455 | ||
984 | 370 | 456 | ||
985 | @@ -376,7 +462,8 @@ | |||
986 | 376 | aFactory->createGDay(result, &d); | 462 | aFactory->createGDay(result, &d); |
987 | 377 | return; | 463 | return; |
988 | 378 | } | 464 | } |
990 | 379 | throwTypeException( err::FORG0001, aErrorInfo ); | 465 | |
991 | 466 | throwFORG0001Exception(strval, errInfo); | ||
992 | 380 | } | 467 | } |
993 | 381 | 468 | ||
994 | 382 | 469 | ||
995 | @@ -389,7 +476,7 @@ | |||
996 | 389 | return; | 476 | return; |
997 | 390 | } | 477 | } |
998 | 391 | 478 | ||
1000 | 392 | throwTypeException( err::FORG0001, aErrorInfo ); | 479 | throwFORG0001Exception(strval, errInfo); |
1001 | 393 | } | 480 | } |
1002 | 394 | 481 | ||
1003 | 395 | 482 | ||
1004 | @@ -426,14 +513,16 @@ | |||
1005 | 426 | } | 513 | } |
1006 | 427 | else | 514 | else |
1007 | 428 | { | 515 | { |
1009 | 429 | throwTypeException( err::FORG0001, aErrorInfo ); | 516 | throwFORG0001Exception(strval, errInfo); |
1010 | 430 | } | 517 | } |
1011 | 431 | 518 | ||
1012 | 432 | pos = str - strval.c_str(); | 519 | pos = str - strval.c_str(); |
1013 | 433 | ascii::skip_whitespace(strval.c_str(), len, &pos); | 520 | ascii::skip_whitespace(strval.c_str(), len, &pos); |
1014 | 434 | 521 | ||
1015 | 435 | if (pos != len) | 522 | if (pos != len) |
1017 | 436 | throwTypeException( err::FORG0001, aErrorInfo ); | 523 | { |
1018 | 524 | throwFORG0001Exception(strval, errInfo); | ||
1019 | 525 | } | ||
1020 | 437 | 526 | ||
1021 | 438 | aFactory->createBoolean(result, lRetValue); | 527 | aFactory->createBoolean(result, lRetValue); |
1022 | 439 | } | 528 | } |
1023 | @@ -448,7 +537,7 @@ | |||
1024 | 448 | return; | 537 | return; |
1025 | 449 | } | 538 | } |
1026 | 450 | 539 | ||
1028 | 451 | throwTypeException( err::FORG0001, aErrorInfo ); | 540 | throwFORG0001Exception(strval, errInfo); |
1029 | 452 | } | 541 | } |
1030 | 453 | 542 | ||
1031 | 454 | 543 | ||
1032 | @@ -460,7 +549,8 @@ | |||
1033 | 460 | aFactory->createHexBinary(result, n); | 549 | aFactory->createHexBinary(result, n); |
1034 | 461 | return; | 550 | return; |
1035 | 462 | } | 551 | } |
1037 | 463 | throwTypeException( err::FORG0001, aErrorInfo ); | 552 | |
1038 | 553 | throwFORG0001Exception(strval, errInfo); | ||
1039 | 464 | } | 554 | } |
1040 | 465 | 555 | ||
1041 | 466 | 556 | ||
1042 | @@ -474,7 +564,7 @@ | |||
1043 | 474 | } | 564 | } |
1044 | 475 | catch (ZorbaException& e) | 565 | catch (ZorbaException& e) |
1045 | 476 | { | 566 | { |
1047 | 477 | e.set_diagnostic( err::FORG0001 ); | 567 | e.set_diagnostic(err::FORG0001); |
1048 | 478 | throw; | 568 | throw; |
1049 | 479 | } | 569 | } |
1050 | 480 | } | 570 | } |
1051 | @@ -488,7 +578,7 @@ | |||
1052 | 488 | zstring::size_type lidx = strval.rfind(":", strval.size(), 1); | 578 | zstring::size_type lidx = strval.rfind(":", strval.size(), 1); |
1053 | 489 | 579 | ||
1054 | 490 | if (idx != lidx) | 580 | if (idx != lidx) |
1056 | 491 | throwTypeException(err::FORG0001, aErrorInfo); | 581 | throwFORG0001Exception(strval, errInfo); |
1057 | 492 | 582 | ||
1058 | 493 | zstring nsuri; | 583 | zstring nsuri; |
1059 | 494 | zstring prefix; | 584 | zstring prefix; |
1060 | @@ -507,20 +597,26 @@ | |||
1061 | 507 | { | 597 | { |
1062 | 508 | prefix = strval.substr(0, idx); | 598 | prefix = strval.substr(0, idx); |
1063 | 509 | 599 | ||
1066 | 510 | if (!GenericCast::instance()->castableToNCName(prefix)) | 600 | if (!GenericCast::castableToNCName(prefix)) |
1067 | 511 | throwTypeException(err::FORG0001, aErrorInfo); | 601 | { |
1068 | 602 | RAISE_ERROR(err::FORG0001, errInfo.theLoc, | ||
1069 | 603 | ERROR_PARAMS(ZED(FORG0001_PrefixNotNCName_2), prefix)); | ||
1070 | 604 | } | ||
1071 | 512 | 605 | ||
1072 | 513 | if (nsCtx) | 606 | if (nsCtx) |
1073 | 514 | { | 607 | { |
1074 | 515 | if (!nsCtx->findBinding(prefix, nsuri)) | 608 | if (!nsCtx->findBinding(prefix, nsuri)) |
1076 | 516 | throw XQUERY_EXCEPTION(err::FONS0004, ERROR_PARAMS(prefix)); | 609 | RAISE_ERROR(err::FONS0004, errInfo.theLoc, ERROR_PARAMS(prefix)); |
1077 | 517 | } | 610 | } |
1078 | 518 | 611 | ||
1079 | 519 | local = strval.substr(idx + 1); | 612 | local = strval.substr(idx + 1); |
1080 | 520 | } | 613 | } |
1081 | 521 | 614 | ||
1084 | 522 | if (!GenericCast::instance()->castableToNCName(local)) | 615 | if (!GenericCast::castableToNCName(local)) |
1085 | 523 | throwTypeException( err::FORG0001, aErrorInfo ); | 616 | { |
1086 | 617 | RAISE_ERROR(err::FORG0001, errInfo.theLoc, | ||
1087 | 618 | ERROR_PARAMS(ZED(FORG0001_LocalNotNCName_2), local)); | ||
1088 | 619 | } | ||
1089 | 524 | 620 | ||
1090 | 525 | aFactory->createQName(result, nsuri, prefix, local); | 621 | aFactory->createQName(result, nsuri, prefix, local); |
1091 | 526 | } | 622 | } |
1092 | @@ -541,11 +637,15 @@ | |||
1093 | 541 | local = strval.substr(pos+1, strval.size()); | 637 | local = strval.substr(pos+1, strval.size()); |
1094 | 542 | } | 638 | } |
1095 | 543 | else | 639 | else |
1096 | 640 | { | ||
1097 | 544 | local = strval; | 641 | local = strval; |
1098 | 642 | } | ||
1099 | 545 | 643 | ||
1100 | 546 | if (!nsCtx->findBinding(prefix, uri)) | 644 | if (!nsCtx->findBinding(prefix, uri)) |
1103 | 547 | ZORBA_ERROR_DESC_OSS(err::FORG0001, "Prefix '" << prefix | 645 | { |
1104 | 548 | << "' not found in current namespace context."); | 646 | RAISE_ERROR(err::FORG0001, errInfo.theLoc, |
1105 | 647 | ERROR_PARAMS(ZED(FORG0001_PrefixNotBound_2), prefix)); | ||
1106 | 648 | } | ||
1107 | 549 | 649 | ||
1108 | 550 | store::Item_t qname; | 650 | store::Item_t qname; |
1109 | 551 | aFactory->createQName(qname, uri, prefix, local); | 651 | aFactory->createQName(qname, uri, prefix, local); |
1110 | @@ -565,7 +665,7 @@ | |||
1111 | 565 | { | 665 | { |
1112 | 566 | zstring strval2; | 666 | zstring strval2; |
1113 | 567 | aItem->getStringValue2(strval2); | 667 | aItem->getStringValue2(strval2); |
1115 | 568 | str_flt(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 668 | str_flt(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1116 | 569 | } | 669 | } |
1117 | 570 | 670 | ||
1118 | 571 | 671 | ||
1119 | @@ -573,7 +673,7 @@ | |||
1120 | 573 | { | 673 | { |
1121 | 574 | zstring strval2; | 674 | zstring strval2; |
1122 | 575 | aItem->getStringValue2(strval2); | 675 | aItem->getStringValue2(strval2); |
1124 | 576 | str_dbl(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 676 | str_dbl(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1125 | 577 | } | 677 | } |
1126 | 578 | 678 | ||
1127 | 579 | 679 | ||
1128 | @@ -581,7 +681,7 @@ | |||
1129 | 581 | { | 681 | { |
1130 | 582 | zstring strval2; | 682 | zstring strval2; |
1131 | 583 | aItem->getStringValue2(strval2); | 683 | aItem->getStringValue2(strval2); |
1133 | 584 | str_dec(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 684 | str_dec(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1134 | 585 | } | 685 | } |
1135 | 586 | 686 | ||
1136 | 587 | 687 | ||
1137 | @@ -589,7 +689,7 @@ | |||
1138 | 589 | { | 689 | { |
1139 | 590 | zstring strval2; | 690 | zstring strval2; |
1140 | 591 | aItem->getStringValue2(strval2); | 691 | aItem->getStringValue2(strval2); |
1142 | 592 | str_int(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 692 | str_int(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1143 | 593 | } | 693 | } |
1144 | 594 | 694 | ||
1145 | 595 | 695 | ||
1146 | @@ -597,7 +697,7 @@ | |||
1147 | 597 | { | 697 | { |
1148 | 598 | zstring strval2; | 698 | zstring strval2; |
1149 | 599 | aItem->getStringValue2(strval2); | 699 | aItem->getStringValue2(strval2); |
1151 | 600 | str_dur(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 700 | str_dur(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1152 | 601 | } | 701 | } |
1153 | 602 | 702 | ||
1154 | 603 | 703 | ||
1155 | @@ -605,7 +705,7 @@ | |||
1156 | 605 | { | 705 | { |
1157 | 606 | zstring strval2; | 706 | zstring strval2; |
1158 | 607 | aItem->getStringValue2(strval2); | 707 | aItem->getStringValue2(strval2); |
1160 | 608 | str_yMD(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 708 | str_yMD(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1161 | 609 | } | 709 | } |
1162 | 610 | 710 | ||
1163 | 611 | 711 | ||
1164 | @@ -613,7 +713,7 @@ | |||
1165 | 613 | { | 713 | { |
1166 | 614 | zstring strval2; | 714 | zstring strval2; |
1167 | 615 | aItem->getStringValue2(strval2); | 715 | aItem->getStringValue2(strval2); |
1169 | 616 | str_dTD(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 716 | str_dTD(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1170 | 617 | } | 717 | } |
1171 | 618 | 718 | ||
1172 | 619 | 719 | ||
1173 | @@ -621,7 +721,7 @@ | |||
1174 | 621 | { | 721 | { |
1175 | 622 | zstring strval2; | 722 | zstring strval2; |
1176 | 623 | aItem->getStringValue2(strval2); | 723 | aItem->getStringValue2(strval2); |
1178 | 624 | str_dT(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 724 | str_dT(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1179 | 625 | } | 725 | } |
1180 | 626 | 726 | ||
1181 | 627 | 727 | ||
1182 | @@ -629,7 +729,7 @@ | |||
1183 | 629 | { | 729 | { |
1184 | 630 | zstring strval2; | 730 | zstring strval2; |
1185 | 631 | aItem->getStringValue2(strval2); | 731 | aItem->getStringValue2(strval2); |
1187 | 632 | str_tim(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 732 | str_tim(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1188 | 633 | } | 733 | } |
1189 | 634 | 734 | ||
1190 | 635 | 735 | ||
1191 | @@ -637,7 +737,7 @@ | |||
1192 | 637 | { | 737 | { |
1193 | 638 | zstring strval2; | 738 | zstring strval2; |
1194 | 639 | aItem->getStringValue2(strval2); | 739 | aItem->getStringValue2(strval2); |
1196 | 640 | str_dat(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 740 | str_dat(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1197 | 641 | } | 741 | } |
1198 | 642 | 742 | ||
1199 | 643 | 743 | ||
1200 | @@ -645,7 +745,7 @@ | |||
1201 | 645 | { | 745 | { |
1202 | 646 | zstring strval2; | 746 | zstring strval2; |
1203 | 647 | aItem->getStringValue2(strval2); | 747 | aItem->getStringValue2(strval2); |
1205 | 648 | str_gYM(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 748 | str_gYM(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1206 | 649 | } | 749 | } |
1207 | 650 | 750 | ||
1208 | 651 | 751 | ||
1209 | @@ -653,7 +753,7 @@ | |||
1210 | 653 | { | 753 | { |
1211 | 654 | zstring strval2; | 754 | zstring strval2; |
1212 | 655 | aItem->getStringValue2(strval2); | 755 | aItem->getStringValue2(strval2); |
1214 | 656 | str_gYr(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 756 | str_gYr(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1215 | 657 | } | 757 | } |
1216 | 658 | 758 | ||
1217 | 659 | 759 | ||
1218 | @@ -661,7 +761,7 @@ | |||
1219 | 661 | { | 761 | { |
1220 | 662 | zstring strval2; | 762 | zstring strval2; |
1221 | 663 | aItem->getStringValue2(strval2); | 763 | aItem->getStringValue2(strval2); |
1223 | 664 | str_gMD(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 764 | str_gMD(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1224 | 665 | } | 765 | } |
1225 | 666 | 766 | ||
1226 | 667 | 767 | ||
1227 | @@ -669,7 +769,7 @@ | |||
1228 | 669 | { | 769 | { |
1229 | 670 | zstring strval2; | 770 | zstring strval2; |
1230 | 671 | aItem->getStringValue2(strval2); | 771 | aItem->getStringValue2(strval2); |
1232 | 672 | str_gDay(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 772 | str_gDay(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1233 | 673 | } | 773 | } |
1234 | 674 | 774 | ||
1235 | 675 | 775 | ||
1236 | @@ -677,7 +777,7 @@ | |||
1237 | 677 | { | 777 | { |
1238 | 678 | zstring strval2; | 778 | zstring strval2; |
1239 | 679 | aItem->getStringValue2(strval2); | 779 | aItem->getStringValue2(strval2); |
1241 | 680 | str_gMon(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 780 | str_gMon(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1242 | 681 | } | 781 | } |
1243 | 682 | 782 | ||
1244 | 683 | 783 | ||
1245 | @@ -685,7 +785,7 @@ | |||
1246 | 685 | { | 785 | { |
1247 | 686 | zstring strval2; | 786 | zstring strval2; |
1248 | 687 | aItem->getStringValue2(strval2); | 787 | aItem->getStringValue2(strval2); |
1250 | 688 | str_bool(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 788 | str_bool(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1251 | 689 | } | 789 | } |
1252 | 690 | 790 | ||
1253 | 691 | 791 | ||
1254 | @@ -693,7 +793,7 @@ | |||
1255 | 693 | { | 793 | { |
1256 | 694 | zstring strval2; | 794 | zstring strval2; |
1257 | 695 | aItem->getStringValue2(strval2); | 795 | aItem->getStringValue2(strval2); |
1259 | 696 | str_b64(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 796 | str_b64(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1260 | 697 | } | 797 | } |
1261 | 698 | 798 | ||
1262 | 699 | 799 | ||
1263 | @@ -701,7 +801,7 @@ | |||
1264 | 701 | { | 801 | { |
1265 | 702 | zstring strval2; | 802 | zstring strval2; |
1266 | 703 | aItem->getStringValue2(strval2); | 803 | aItem->getStringValue2(strval2); |
1268 | 704 | str_hxB(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 804 | str_hxB(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1269 | 705 | } | 805 | } |
1270 | 706 | 806 | ||
1271 | 707 | 807 | ||
1272 | @@ -709,7 +809,7 @@ | |||
1273 | 709 | { | 809 | { |
1274 | 710 | zstring strval2; | 810 | zstring strval2; |
1275 | 711 | aItem->getStringValue2(strval2); | 811 | aItem->getStringValue2(strval2); |
1277 | 712 | str_aURI(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 812 | str_aURI(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1278 | 713 | } | 813 | } |
1279 | 714 | 814 | ||
1280 | 715 | 815 | ||
1281 | @@ -717,13 +817,13 @@ | |||
1282 | 717 | { | 817 | { |
1283 | 718 | zstring strval2; | 818 | zstring strval2; |
1284 | 719 | aItem->getStringValue2(strval2); | 819 | aItem->getStringValue2(strval2); |
1286 | 720 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 820 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1287 | 721 | } | 821 | } |
1288 | 722 | 822 | ||
1289 | 723 | 823 | ||
1290 | 724 | T1_TO_T2(flt, str) | 824 | T1_TO_T2(flt, str) |
1291 | 725 | { | 825 | { |
1293 | 726 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 826 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1294 | 727 | } | 827 | } |
1295 | 728 | 828 | ||
1296 | 729 | 829 | ||
1297 | @@ -740,9 +840,9 @@ | |||
1298 | 740 | xs_decimal const n( aItem->getFloatValue() ); | 840 | xs_decimal const n( aItem->getFloatValue() ); |
1299 | 741 | aFactory->createDecimal(result, n); | 841 | aFactory->createDecimal(result, n); |
1300 | 742 | } | 842 | } |
1302 | 743 | catch ( std::exception const& /*e*/ ) | 843 | catch (const std::exception&) |
1303 | 744 | { | 844 | { |
1305 | 745 | throwTypeException( err::FOCA0002, aErrorInfo ); | 845 | throwFOCA0002Exception(aItem->getStringValue(), errInfo); |
1306 | 746 | } | 846 | } |
1307 | 747 | } | 847 | } |
1308 | 748 | 848 | ||
1309 | @@ -753,9 +853,9 @@ | |||
1310 | 753 | { | 853 | { |
1311 | 754 | aFactory->createInteger(result, xs_integer(aItem->getFloatValue())); | 854 | aFactory->createInteger(result, xs_integer(aItem->getFloatValue())); |
1312 | 755 | } | 855 | } |
1314 | 756 | catch ( std::exception const& ) | 856 | catch (const std::exception&) |
1315 | 757 | { | 857 | { |
1317 | 758 | throwTypeException( err::FOCA0002, aErrorInfo ); | 858 | throwFOCA0002Exception(aItem->getStringValue(), errInfo); |
1318 | 759 | } | 859 | } |
1319 | 760 | } | 860 | } |
1320 | 761 | 861 | ||
1321 | @@ -770,13 +870,13 @@ | |||
1322 | 770 | { | 870 | { |
1323 | 771 | zstring strval2; | 871 | zstring strval2; |
1324 | 772 | aItem->getStringValue2(strval2); | 872 | aItem->getStringValue2(strval2); |
1326 | 773 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 873 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1327 | 774 | } | 874 | } |
1328 | 775 | 875 | ||
1329 | 776 | 876 | ||
1330 | 777 | T1_TO_T2(dbl, str) | 877 | T1_TO_T2(dbl, str) |
1331 | 778 | { | 878 | { |
1333 | 779 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 879 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1334 | 780 | } | 880 | } |
1335 | 781 | 881 | ||
1336 | 782 | 882 | ||
1337 | @@ -793,9 +893,9 @@ | |||
1338 | 793 | xs_decimal const n( aItem->getDoubleValue() ); | 893 | xs_decimal const n( aItem->getDoubleValue() ); |
1339 | 794 | aFactory->createDecimal(result, n); | 894 | aFactory->createDecimal(result, n); |
1340 | 795 | } | 895 | } |
1342 | 796 | catch ( std::exception const& ) | 896 | catch (const std::exception&) |
1343 | 797 | { | 897 | { |
1345 | 798 | throwTypeException(err::FOCA0002, aErrorInfo); | 898 | throwFOCA0002Exception(aItem->getStringValue(), errInfo); |
1346 | 799 | } | 899 | } |
1347 | 800 | } | 900 | } |
1348 | 801 | 901 | ||
1349 | @@ -806,9 +906,9 @@ | |||
1350 | 806 | { | 906 | { |
1351 | 807 | aFactory->createInteger(result, xs_integer(aItem->getDoubleValue())); | 907 | aFactory->createInteger(result, xs_integer(aItem->getDoubleValue())); |
1352 | 808 | } | 908 | } |
1354 | 809 | catch ( std::exception const& ) | 909 | catch (const std::exception& ) |
1355 | 810 | { | 910 | { |
1357 | 811 | throwTypeException( err::FOCA0002, aErrorInfo ); | 911 | throwFOCA0002Exception(aItem->getStringValue(), errInfo); |
1358 | 812 | } | 912 | } |
1359 | 813 | } | 913 | } |
1360 | 814 | 914 | ||
1361 | @@ -823,13 +923,13 @@ | |||
1362 | 823 | { | 923 | { |
1363 | 824 | zstring strval2; | 924 | zstring strval2; |
1364 | 825 | aItem->getStringValue2(strval2); | 925 | aItem->getStringValue2(strval2); |
1366 | 826 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 926 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1367 | 827 | } | 927 | } |
1368 | 828 | 928 | ||
1369 | 829 | 929 | ||
1370 | 830 | T1_TO_T2(dec, str) | 930 | T1_TO_T2(dec, str) |
1371 | 831 | { | 931 | { |
1373 | 832 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 932 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1374 | 833 | } | 933 | } |
1375 | 834 | 934 | ||
1376 | 835 | 935 | ||
1377 | @@ -861,13 +961,13 @@ | |||
1378 | 861 | { | 961 | { |
1379 | 862 | zstring strval2; | 962 | zstring strval2; |
1380 | 863 | aItem->getStringValue2(strval2); | 963 | aItem->getStringValue2(strval2); |
1382 | 864 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 964 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1383 | 865 | } | 965 | } |
1384 | 866 | 966 | ||
1385 | 867 | 967 | ||
1386 | 868 | T1_TO_T2(int, str) | 968 | T1_TO_T2(int, str) |
1387 | 869 | { | 969 | { |
1389 | 870 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 970 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1390 | 871 | } | 971 | } |
1391 | 872 | 972 | ||
1392 | 873 | 973 | ||
1393 | @@ -899,13 +999,13 @@ | |||
1394 | 899 | { | 999 | { |
1395 | 900 | zstring strval2; | 1000 | zstring strval2; |
1396 | 901 | aItem->getStringValue2(strval2); | 1001 | aItem->getStringValue2(strval2); |
1398 | 902 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1002 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1399 | 903 | } | 1003 | } |
1400 | 904 | 1004 | ||
1401 | 905 | 1005 | ||
1402 | 906 | T1_TO_T2(dur, str) | 1006 | T1_TO_T2(dur, str) |
1403 | 907 | { | 1007 | { |
1405 | 908 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1008 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1406 | 909 | } | 1009 | } |
1407 | 910 | 1010 | ||
1408 | 911 | 1011 | ||
1409 | @@ -929,13 +1029,13 @@ | |||
1410 | 929 | { | 1029 | { |
1411 | 930 | zstring strval2; | 1030 | zstring strval2; |
1412 | 931 | aItem->getStringValue2(strval2); | 1031 | aItem->getStringValue2(strval2); |
1414 | 932 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1032 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1415 | 933 | } | 1033 | } |
1416 | 934 | 1034 | ||
1417 | 935 | 1035 | ||
1418 | 936 | T1_TO_T2(yMD, str) | 1036 | T1_TO_T2(yMD, str) |
1419 | 937 | { | 1037 | { |
1421 | 938 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1038 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1422 | 939 | } | 1039 | } |
1423 | 940 | 1040 | ||
1424 | 941 | 1041 | ||
1425 | @@ -959,13 +1059,13 @@ | |||
1426 | 959 | { | 1059 | { |
1427 | 960 | zstring strval2; | 1060 | zstring strval2; |
1428 | 961 | aItem->getStringValue2(strval2); | 1061 | aItem->getStringValue2(strval2); |
1430 | 962 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1062 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1431 | 963 | } | 1063 | } |
1432 | 964 | 1064 | ||
1433 | 965 | 1065 | ||
1434 | 966 | T1_TO_T2(dTD, str) | 1066 | T1_TO_T2(dTD, str) |
1435 | 967 | { | 1067 | { |
1437 | 968 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1068 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1438 | 969 | } | 1069 | } |
1439 | 970 | 1070 | ||
1440 | 971 | 1071 | ||
1441 | @@ -989,13 +1089,13 @@ | |||
1442 | 989 | { | 1089 | { |
1443 | 990 | zstring strval2; | 1090 | zstring strval2; |
1444 | 991 | aItem->getStringValue2(strval2); | 1091 | aItem->getStringValue2(strval2); |
1446 | 992 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1092 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1447 | 993 | } | 1093 | } |
1448 | 994 | 1094 | ||
1449 | 995 | 1095 | ||
1450 | 996 | T1_TO_T2(dT, str) | 1096 | T1_TO_T2(dT, str) |
1451 | 997 | { | 1097 | { |
1453 | 998 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1098 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1454 | 999 | } | 1099 | } |
1455 | 1000 | 1100 | ||
1456 | 1001 | 1101 | ||
1457 | @@ -1059,13 +1159,13 @@ | |||
1458 | 1059 | { | 1159 | { |
1459 | 1060 | zstring strval2; | 1160 | zstring strval2; |
1460 | 1061 | aItem->getStringValue2(strval2); | 1161 | aItem->getStringValue2(strval2); |
1462 | 1062 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1162 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1463 | 1063 | } | 1163 | } |
1464 | 1064 | 1164 | ||
1465 | 1065 | 1165 | ||
1466 | 1066 | T1_TO_T2(tim, str) | 1166 | T1_TO_T2(tim, str) |
1467 | 1067 | { | 1167 | { |
1469 | 1068 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1168 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1470 | 1069 | } | 1169 | } |
1471 | 1070 | 1170 | ||
1472 | 1071 | 1171 | ||
1473 | @@ -1073,13 +1173,13 @@ | |||
1474 | 1073 | { | 1173 | { |
1475 | 1074 | zstring strval2; | 1174 | zstring strval2; |
1476 | 1075 | aItem->getStringValue2(strval2); | 1175 | aItem->getStringValue2(strval2); |
1478 | 1076 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1176 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1479 | 1077 | } | 1177 | } |
1480 | 1078 | 1178 | ||
1481 | 1079 | 1179 | ||
1482 | 1080 | T1_TO_T2(dat, str) | 1180 | T1_TO_T2(dat, str) |
1483 | 1081 | { | 1181 | { |
1485 | 1082 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1182 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1486 | 1083 | } | 1183 | } |
1487 | 1084 | 1184 | ||
1488 | 1085 | 1185 | ||
1489 | @@ -1135,13 +1235,13 @@ | |||
1490 | 1135 | { | 1235 | { |
1491 | 1136 | zstring strval2; | 1236 | zstring strval2; |
1492 | 1137 | aItem->getStringValue2(strval2); | 1237 | aItem->getStringValue2(strval2); |
1494 | 1138 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1238 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1495 | 1139 | } | 1239 | } |
1496 | 1140 | 1240 | ||
1497 | 1141 | 1241 | ||
1498 | 1142 | T1_TO_T2(gYM, str) | 1242 | T1_TO_T2(gYM, str) |
1499 | 1143 | { | 1243 | { |
1501 | 1144 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1244 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1502 | 1145 | } | 1245 | } |
1503 | 1146 | 1246 | ||
1504 | 1147 | 1247 | ||
1505 | @@ -1149,13 +1249,13 @@ | |||
1506 | 1149 | { | 1249 | { |
1507 | 1150 | zstring strval2; | 1250 | zstring strval2; |
1508 | 1151 | aItem->getStringValue2(strval2); | 1251 | aItem->getStringValue2(strval2); |
1510 | 1152 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1252 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1511 | 1153 | } | 1253 | } |
1512 | 1154 | 1254 | ||
1513 | 1155 | 1255 | ||
1514 | 1156 | T1_TO_T2(gYr, str) | 1256 | T1_TO_T2(gYr, str) |
1515 | 1157 | { | 1257 | { |
1517 | 1158 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1258 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1518 | 1159 | } | 1259 | } |
1519 | 1160 | 1260 | ||
1520 | 1161 | 1261 | ||
1521 | @@ -1163,13 +1263,13 @@ | |||
1522 | 1163 | { | 1263 | { |
1523 | 1164 | zstring strval2; | 1264 | zstring strval2; |
1524 | 1165 | aItem->getStringValue2(strval2); | 1265 | aItem->getStringValue2(strval2); |
1526 | 1166 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1266 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1527 | 1167 | } | 1267 | } |
1528 | 1168 | 1268 | ||
1529 | 1169 | 1269 | ||
1530 | 1170 | T1_TO_T2(gMD, str) | 1270 | T1_TO_T2(gMD, str) |
1531 | 1171 | { | 1271 | { |
1533 | 1172 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1272 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1534 | 1173 | } | 1273 | } |
1535 | 1174 | 1274 | ||
1536 | 1175 | 1275 | ||
1537 | @@ -1177,13 +1277,13 @@ | |||
1538 | 1177 | { | 1277 | { |
1539 | 1178 | zstring strval2; | 1278 | zstring strval2; |
1540 | 1179 | aItem->getStringValue2(strval2); | 1279 | aItem->getStringValue2(strval2); |
1542 | 1180 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1280 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1543 | 1181 | } | 1281 | } |
1544 | 1182 | 1282 | ||
1545 | 1183 | 1283 | ||
1546 | 1184 | T1_TO_T2(gDay, str) | 1284 | T1_TO_T2(gDay, str) |
1547 | 1185 | { | 1285 | { |
1549 | 1186 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1286 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1550 | 1187 | } | 1287 | } |
1551 | 1188 | 1288 | ||
1552 | 1189 | 1289 | ||
1553 | @@ -1191,13 +1291,13 @@ | |||
1554 | 1191 | { | 1291 | { |
1555 | 1192 | zstring strval2; | 1292 | zstring strval2; |
1556 | 1193 | aItem->getStringValue2(strval2); | 1293 | aItem->getStringValue2(strval2); |
1558 | 1194 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1294 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1559 | 1195 | } | 1295 | } |
1560 | 1196 | 1296 | ||
1561 | 1197 | 1297 | ||
1562 | 1198 | T1_TO_T2(gMon, str) | 1298 | T1_TO_T2(gMon, str) |
1563 | 1199 | { | 1299 | { |
1565 | 1200 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1300 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1566 | 1201 | } | 1301 | } |
1567 | 1202 | 1302 | ||
1568 | 1203 | 1303 | ||
1569 | @@ -1205,13 +1305,13 @@ | |||
1570 | 1205 | { | 1305 | { |
1571 | 1206 | zstring strval2; | 1306 | zstring strval2; |
1572 | 1207 | aItem->getStringValue2(strval2); | 1307 | aItem->getStringValue2(strval2); |
1574 | 1208 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1308 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1575 | 1209 | } | 1309 | } |
1576 | 1210 | 1310 | ||
1577 | 1211 | 1311 | ||
1578 | 1212 | T1_TO_T2(bool, str) | 1312 | T1_TO_T2(bool, str) |
1579 | 1213 | { | 1313 | { |
1581 | 1214 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1314 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1582 | 1215 | } | 1315 | } |
1583 | 1216 | 1316 | ||
1584 | 1217 | 1317 | ||
1585 | @@ -1255,13 +1355,13 @@ | |||
1586 | 1255 | { | 1355 | { |
1587 | 1256 | zstring strval2; | 1356 | zstring strval2; |
1588 | 1257 | aItem->getStringValue2(strval2); | 1357 | aItem->getStringValue2(strval2); |
1590 | 1258 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1358 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1591 | 1259 | } | 1359 | } |
1592 | 1260 | 1360 | ||
1593 | 1261 | 1361 | ||
1594 | 1262 | T1_TO_T2(b64, str) | 1362 | T1_TO_T2(b64, str) |
1595 | 1263 | { | 1363 | { |
1597 | 1264 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1364 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1598 | 1265 | } | 1365 | } |
1599 | 1266 | 1366 | ||
1600 | 1267 | 1367 | ||
1601 | @@ -1286,13 +1386,13 @@ | |||
1602 | 1286 | { | 1386 | { |
1603 | 1287 | zstring strval2; | 1387 | zstring strval2; |
1604 | 1288 | aItem->getStringValue2(strval2); | 1388 | aItem->getStringValue2(strval2); |
1606 | 1289 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1389 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1607 | 1290 | } | 1390 | } |
1608 | 1291 | 1391 | ||
1609 | 1292 | 1392 | ||
1610 | 1293 | T1_TO_T2(hxB, str) | 1393 | T1_TO_T2(hxB, str) |
1611 | 1294 | { | 1394 | { |
1613 | 1295 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1395 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1614 | 1296 | } | 1396 | } |
1615 | 1297 | 1397 | ||
1616 | 1298 | 1398 | ||
1617 | @@ -1307,13 +1407,13 @@ | |||
1618 | 1307 | { | 1407 | { |
1619 | 1308 | zstring strval2; | 1408 | zstring strval2; |
1620 | 1309 | aItem->getStringValue2(strval2); | 1409 | aItem->getStringValue2(strval2); |
1622 | 1310 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1410 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1623 | 1311 | } | 1411 | } |
1624 | 1312 | 1412 | ||
1625 | 1313 | 1413 | ||
1626 | 1314 | T1_TO_T2(aURI, str) | 1414 | T1_TO_T2(aURI, str) |
1627 | 1315 | { | 1415 | { |
1629 | 1316 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1416 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1630 | 1317 | } | 1417 | } |
1631 | 1318 | 1418 | ||
1632 | 1319 | 1419 | ||
1633 | @@ -1321,13 +1421,13 @@ | |||
1634 | 1321 | { | 1421 | { |
1635 | 1322 | zstring strval2; | 1422 | zstring strval2; |
1636 | 1323 | aItem->getStringValue2(strval2); | 1423 | aItem->getStringValue2(strval2); |
1638 | 1324 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1424 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1639 | 1325 | } | 1425 | } |
1640 | 1326 | 1426 | ||
1641 | 1327 | 1427 | ||
1642 | 1328 | T1_TO_T2(QN, str) | 1428 | T1_TO_T2(QN, str) |
1643 | 1329 | { | 1429 | { |
1645 | 1330 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1430 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1646 | 1331 | } | 1431 | } |
1647 | 1332 | 1432 | ||
1648 | 1333 | 1433 | ||
1649 | @@ -1335,13 +1435,13 @@ | |||
1650 | 1335 | { | 1435 | { |
1651 | 1336 | zstring strval2; | 1436 | zstring strval2; |
1652 | 1337 | aItem->getStringValue2(strval2); | 1437 | aItem->getStringValue2(strval2); |
1654 | 1338 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1438 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1655 | 1339 | } | 1439 | } |
1656 | 1340 | 1440 | ||
1657 | 1341 | 1441 | ||
1658 | 1342 | T1_TO_T2(NOT, str) | 1442 | T1_TO_T2(NOT, str) |
1659 | 1343 | { | 1443 | { |
1661 | 1344 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1444 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1662 | 1345 | } | 1445 | } |
1663 | 1346 | 1446 | ||
1664 | 1347 | 1447 | ||
1665 | @@ -1349,13 +1449,13 @@ | |||
1666 | 1349 | { | 1449 | { |
1667 | 1350 | zstring strval2; | 1450 | zstring strval2; |
1668 | 1351 | aItem->getStringValue2(strval2); | 1451 | aItem->getStringValue2(strval2); |
1670 | 1352 | str_uA(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1452 | str_uA(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1671 | 1353 | } | 1453 | } |
1672 | 1354 | 1454 | ||
1673 | 1355 | 1455 | ||
1674 | 1356 | T1_TO_T2(uint, str) | 1456 | T1_TO_T2(uint, str) |
1675 | 1357 | { | 1457 | { |
1677 | 1358 | uA_str(result, aItem, strval, aFactory, nsCtx, aErrorInfo); | 1458 | uA_str(result, aItem, strval, aFactory, nsCtx, errInfo); |
1678 | 1359 | } | 1459 | } |
1679 | 1360 | 1460 | ||
1680 | 1361 | 1461 | ||
1681 | @@ -1387,7 +1487,7 @@ | |||
1682 | 1387 | { | 1487 | { |
1683 | 1388 | zstring strval2; | 1488 | zstring strval2; |
1684 | 1389 | aItem->getStringValue2(strval2); | 1489 | aItem->getStringValue2(strval2); |
1686 | 1390 | str_int(result, aItem, strval2, aFactory, nsCtx, aErrorInfo); | 1490 | str_int(result, aItem, strval2, aFactory, nsCtx, errInfo); |
1687 | 1391 | } | 1491 | } |
1688 | 1392 | 1492 | ||
1689 | 1393 | 1493 | ||
1690 | @@ -1398,9 +1498,9 @@ | |||
1691 | 1398 | xs_nonNegativeInteger const n(aItem->getFloatValue()); | 1498 | xs_nonNegativeInteger const n(aItem->getFloatValue()); |
1692 | 1399 | aFactory->createNonNegativeInteger(result, n); | 1499 | aFactory->createNonNegativeInteger(result, n); |
1693 | 1400 | } | 1500 | } |
1695 | 1401 | catch ( std::exception const& ) | 1501 | catch (const std::exception& ) |
1696 | 1402 | { | 1502 | { |
1698 | 1403 | throwTypeException( err::FOCA0002, aErrorInfo ); | 1503 | throwFOCA0002Exception(aItem->getStringValue(), errInfo); |
1699 | 1404 | } | 1504 | } |
1700 | 1405 | } | 1505 | } |
1701 | 1406 | 1506 | ||
1702 | @@ -1412,9 +1512,9 @@ | |||
1703 | 1412 | xs_nonNegativeInteger const n(aItem->getIntegerValue()); | 1512 | xs_nonNegativeInteger const n(aItem->getIntegerValue()); |
1704 | 1413 | aFactory->createNonNegativeInteger(result, n); | 1513 | aFactory->createNonNegativeInteger(result, n); |
1705 | 1414 | } | 1514 | } |
1707 | 1415 | catch ( std::exception const& ) | 1515 | catch (const std::exception& ) |
1708 | 1416 | { | 1516 | { |
1710 | 1417 | throwTypeException( err::FOCA0002, aErrorInfo ); | 1517 | throwFOCA0002Exception(aItem->getStringValue(), errInfo); |
1711 | 1418 | } | 1518 | } |
1712 | 1419 | } | 1519 | } |
1713 | 1420 | 1520 | ||
1714 | @@ -1426,9 +1526,9 @@ | |||
1715 | 1426 | xs_integer const n(aItem->getIntegerValue()); | 1526 | xs_integer const n(aItem->getIntegerValue()); |
1716 | 1427 | aFactory->createInteger(result, n); | 1527 | aFactory->createInteger(result, n); |
1717 | 1428 | } | 1528 | } |
1719 | 1429 | catch ( std::exception const& ) | 1529 | catch (const std::exception& ) |
1720 | 1430 | { | 1530 | { |
1722 | 1431 | throwTypeException( err::FOCA0002, aErrorInfo ); | 1531 | throwFOCA0002Exception(aItem->getStringValue(), errInfo); |
1723 | 1432 | } | 1532 | } |
1724 | 1433 | } | 1533 | } |
1725 | 1434 | 1534 | ||
1726 | @@ -1440,9 +1540,9 @@ | |||
1727 | 1440 | xs_nonNegativeInteger const n(aItem->getDoubleValue()); | 1540 | xs_nonNegativeInteger const n(aItem->getDoubleValue()); |
1728 | 1441 | aFactory->createInteger(result, n); | 1541 | aFactory->createInteger(result, n); |
1729 | 1442 | } | 1542 | } |
1731 | 1443 | catch ( std::exception const& ) | 1543 | catch (const std::exception& ) |
1732 | 1444 | { | 1544 | { |
1734 | 1445 | throwTypeException( err::FOCA0002, aErrorInfo ); | 1545 | throwFOCA0002Exception(aItem->getStringValue(), errInfo); |
1735 | 1446 | } | 1546 | } |
1736 | 1447 | } | 1547 | } |
1737 | 1448 | 1548 | ||
1738 | @@ -1463,24 +1563,6 @@ | |||
1739 | 1463 | } | 1563 | } |
1740 | 1464 | 1564 | ||
1741 | 1465 | 1565 | ||
1742 | 1466 | T1_TO_T2(str, uint) | ||
1743 | 1467 | { | ||
1744 | 1468 | try | ||
1745 | 1469 | { | ||
1746 | 1470 | xs_nonNegativeInteger const n(strval.c_str()); | ||
1747 | 1471 | aFactory->createNonNegativeInteger(result, n); | ||
1748 | 1472 | } | ||
1749 | 1473 | catch ( std::invalid_argument const& ) | ||
1750 | 1474 | { | ||
1751 | 1475 | throwTypeException( err::FORG0001, aErrorInfo ); | ||
1752 | 1476 | } | ||
1753 | 1477 | catch ( std::range_error const& ) | ||
1754 | 1478 | { | ||
1755 | 1479 | throwTypeException( err::FOCA0002, aErrorInfo ); | ||
1756 | 1480 | } | ||
1757 | 1481 | } | ||
1758 | 1482 | |||
1759 | 1483 | |||
1760 | 1484 | T1_TO_T2(NUL, str) | 1566 | T1_TO_T2(NUL, str) |
1761 | 1485 | { | 1567 | { |
1762 | 1486 | zstring val("null"); | 1568 | zstring val("null"); |
1763 | @@ -1496,7 +1578,7 @@ | |||
1764 | 1496 | const store::Item* aItem, | 1578 | const store::Item* aItem, |
1765 | 1497 | store::SchemaTypeCode aTargetAtomicType, | 1579 | store::SchemaTypeCode aTargetAtomicType, |
1766 | 1498 | store::ItemFactory* factory, | 1580 | store::ItemFactory* factory, |
1768 | 1499 | const ErrorInfo& aErrorInfo) | 1581 | const ErrorInfo& errInfo) |
1769 | 1500 | { | 1582 | { |
1770 | 1501 | zstring strval; | 1583 | zstring strval; |
1771 | 1502 | aItem->getStringValue2(strval); | 1584 | aItem->getStringValue2(strval); |
1772 | @@ -1557,7 +1639,7 @@ | |||
1773 | 1557 | ascii::normalize_whitespace(strval); | 1639 | ascii::normalize_whitespace(strval); |
1774 | 1558 | ascii::trim_whitespace(strval); | 1640 | ascii::trim_whitespace(strval); |
1775 | 1559 | 1641 | ||
1777 | 1560 | if (GenericCast::instance()->castableToNCName(strval)) | 1642 | if (GenericCast::castableToNCName(strval)) |
1778 | 1561 | { | 1643 | { |
1779 | 1562 | factory->createNCName(result, strval); | 1644 | factory->createNCName(result, strval); |
1780 | 1563 | return; | 1645 | return; |
1781 | @@ -1566,7 +1648,7 @@ | |||
1782 | 1566 | } | 1648 | } |
1783 | 1567 | case store::XS_ID: | 1649 | case store::XS_ID: |
1784 | 1568 | { | 1650 | { |
1786 | 1569 | if (GenericCast::instance()->castableToNCName(strval)) | 1651 | if (GenericCast::castableToNCName(strval)) |
1787 | 1570 | { | 1652 | { |
1788 | 1571 | factory->createID(result, strval); | 1653 | factory->createID(result, strval); |
1789 | 1572 | return; | 1654 | return; |
1790 | @@ -1575,7 +1657,7 @@ | |||
1791 | 1575 | } | 1657 | } |
1792 | 1576 | case store::XS_IDREF: | 1658 | case store::XS_IDREF: |
1793 | 1577 | { | 1659 | { |
1795 | 1578 | if (GenericCast::instance()->castableToNCName(strval)) | 1660 | if (GenericCast::castableToNCName(strval)) |
1796 | 1579 | { | 1661 | { |
1797 | 1580 | factory->createIDREF(result, strval); | 1662 | factory->createIDREF(result, strval); |
1798 | 1581 | return; | 1663 | return; |
1799 | @@ -1584,7 +1666,7 @@ | |||
1800 | 1584 | } | 1666 | } |
1801 | 1585 | case store::XS_ENTITY: | 1667 | case store::XS_ENTITY: |
1802 | 1586 | { | 1668 | { |
1804 | 1587 | if (GenericCast::instance()->castableToNCName(strval)) | 1669 | if (GenericCast::castableToNCName(strval)) |
1805 | 1588 | { | 1670 | { |
1806 | 1589 | factory->createENTITY(result, strval); | 1671 | factory->createENTITY(result, strval); |
1807 | 1590 | return; | 1672 | return; |
1808 | @@ -1595,7 +1677,7 @@ | |||
1809 | 1595 | ZORBA_ASSERT(false); | 1677 | ZORBA_ASSERT(false); |
1810 | 1596 | } | 1678 | } |
1811 | 1597 | 1679 | ||
1813 | 1598 | throwTypeException(err::FORG0001, aErrorInfo); | 1680 | throwFORG0001Exception(strval, errInfo); |
1814 | 1599 | } | 1681 | } |
1815 | 1600 | 1682 | ||
1816 | 1601 | 1683 | ||
1817 | @@ -1795,7 +1877,7 @@ | |||
1818 | 1795 | ZORBA_ASSERT(false); | 1877 | ZORBA_ASSERT(false); |
1819 | 1796 | } | 1878 | } |
1820 | 1797 | 1879 | ||
1822 | 1798 | throwTypeException(err::FORG0001, errInfo); | 1880 | throwFORG0001Exception(aItem->getStringValue(), errInfo); |
1823 | 1799 | } | 1881 | } |
1824 | 1800 | 1882 | ||
1825 | 1801 | 1883 | ||
1826 | @@ -2047,6 +2129,7 @@ | |||
1827 | 2047 | const QueryLoc& loc) | 2129 | const QueryLoc& loc) |
1828 | 2048 | { | 2130 | { |
1829 | 2049 | const TypeManager* ttm = targetType->get_manager(); | 2131 | const TypeManager* ttm = targetType->get_manager(); |
1830 | 2132 | |||
1831 | 2050 | if (ttm != tm && ttm != &GENV_TYPESYSTEM && !TypeOps::is_in_scope(tm, *targetType)) | 2133 | if (ttm != tm && ttm != &GENV_TYPESYSTEM && !TypeOps::is_in_scope(tm, *targetType)) |
1832 | 2051 | { | 2134 | { |
1833 | 2052 | RAISE_ERROR(err::XPTY0004, loc, | 2135 | RAISE_ERROR(err::XPTY0004, loc, |
1834 | @@ -2129,8 +2212,13 @@ | |||
1835 | 2129 | } | 2212 | } |
1836 | 2130 | } | 2213 | } |
1837 | 2131 | 2214 | ||
1838 | 2215 | xqtref_t sourceType = tm->create_value_type(item); | ||
1839 | 2216 | |||
1840 | 2132 | RAISE_ERROR(err::FORG0001, loc, | 2217 | RAISE_ERROR(err::FORG0001, loc, |
1842 | 2133 | ERROR_PARAMS(item->getStringValue(), ZED(NoCastTo_34o), udt->toSchemaString())); | 2218 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234), |
1843 | 2219 | item->getStringValue(), | ||
1844 | 2220 | sourceType->toSchemaString(), | ||
1845 | 2221 | udt->toSchemaString())); | ||
1846 | 2134 | } // union | 2222 | } // union |
1847 | 2135 | #endif // ZORBA_NO_XMLSCHEMA | 2223 | #endif // ZORBA_NO_XMLSCHEMA |
1848 | 2136 | } // list or union | 2224 | } // list or union |
1849 | @@ -2195,7 +2283,7 @@ | |||
1850 | 2195 | CastFunc castFunc = theCastMatrix[theMapping[sourceTypeCode]] | 2283 | CastFunc castFunc = theCastMatrix[theMapping[sourceTypeCode]] |
1851 | 2196 | [theMapping[targetTypeCode]]; | 2284 | [theMapping[targetTypeCode]]; |
1852 | 2197 | if (castFunc == 0) | 2285 | if (castFunc == 0) |
1854 | 2198 | throwTypeException(err::XPTY0004, errInfo); | 2286 | throwXPTY0004Exception(errInfo); |
1855 | 2199 | 2287 | ||
1856 | 2200 | (*castFunc)(result, item, str, factory, nsCtx, errInfo); | 2288 | (*castFunc)(result, item, str, factory, nsCtx, errInfo); |
1857 | 2201 | } | 2289 | } |
1858 | @@ -2323,7 +2411,7 @@ | |||
1859 | 2323 | 2411 | ||
1860 | 2324 | if (sourceTypeCode == store::XS_ANY_ATOMIC) | 2412 | if (sourceTypeCode == store::XS_ANY_ATOMIC) |
1861 | 2325 | { | 2413 | { |
1863 | 2326 | throwTypeException(err::XPTY0004, errInfo); | 2414 | throwXPTY0004Exception(errInfo); |
1864 | 2327 | } | 2415 | } |
1865 | 2328 | 2416 | ||
1866 | 2329 | if (targetTypeCode == store::XS_NCNAME && | 2417 | if (targetTypeCode == store::XS_NCNAME && |
1867 | @@ -2331,14 +2419,14 @@ | |||
1868 | 2331 | sourceTypeCode != store::XS_NCNAME && | 2419 | sourceTypeCode != store::XS_NCNAME && |
1869 | 2332 | sourceTypeCode != store::XS_UNTYPED_ATOMIC) | 2420 | sourceTypeCode != store::XS_UNTYPED_ATOMIC) |
1870 | 2333 | { | 2421 | { |
1872 | 2334 | throwTypeException(err::XPTY0004, errInfo); | 2422 | throwXPTY0004Exception(errInfo); |
1873 | 2335 | } | 2423 | } |
1874 | 2336 | 2424 | ||
1875 | 2337 | CastFunc castFunc = theCastMatrix[theMapping[sourceTypeCode]] | 2425 | CastFunc castFunc = theCastMatrix[theMapping[sourceTypeCode]] |
1876 | 2338 | [theMapping[targetTypeCode]]; | 2426 | [theMapping[targetTypeCode]]; |
1877 | 2339 | if (castFunc == 0) | 2427 | if (castFunc == 0) |
1878 | 2340 | { | 2428 | { |
1880 | 2341 | throwTypeException(err::XPTY0004, errInfo); | 2429 | throwXPTY0004Exception(errInfo); |
1881 | 2342 | } | 2430 | } |
1882 | 2343 | 2431 | ||
1883 | 2344 | if (theMapping[sourceTypeCode] == theMapping[store::XS_STRING]) | 2432 | if (theMapping[sourceTypeCode] == theMapping[store::XS_STRING]) |
1884 | @@ -2392,19 +2480,21 @@ | |||
1885 | 2392 | ERROR_PARAMS(ZED(BadType_23o), *sourceType, ZED(NoCastTo_45o), "QName")); | 2480 | ERROR_PARAMS(ZED(BadType_23o), *sourceType, ZED(NoCastTo_45o), "QName")); |
1886 | 2393 | } | 2481 | } |
1887 | 2394 | 2482 | ||
1889 | 2395 | ErrorInfo errorInfo(sourceType.getp(), rtm.QNAME_TYPE_ONE.getp(), loc); | 2483 | ErrorInfo errInfo(sourceType.getp(), rtm.QNAME_TYPE_ONE.getp(), loc); |
1890 | 2396 | 2484 | ||
1891 | 2397 | zstring strval; | 2485 | zstring strval; |
1892 | 2398 | item->getStringValue2(strval); | 2486 | item->getStringValue2(strval); |
1893 | 2487 | |||
1894 | 2399 | ascii::trim_whitespace(strval); | 2488 | ascii::trim_whitespace(strval); |
1895 | 2400 | 2489 | ||
1896 | 2401 | zstring::size_type idx = strval.find(":"); | 2490 | zstring::size_type idx = strval.find(":"); |
1897 | 2402 | zstring::size_type lidx = strval.rfind(":", strval.size(), 1); | 2491 | zstring::size_type lidx = strval.rfind(":", strval.size(), 1); |
1898 | 2492 | |||
1899 | 2403 | if (idx != lidx) | 2493 | if (idx != lidx) |
1901 | 2404 | throwTypeException(err::FORG0001, errorInfo); | 2494 | throwFORG0001Exception(strval, errInfo); |
1902 | 2405 | 2495 | ||
1903 | 2496 | zstring nsuri; | ||
1904 | 2406 | zstring prefix; | 2497 | zstring prefix; |
1905 | 2407 | zstring nsuri; | ||
1906 | 2408 | zstring local; | 2498 | zstring local; |
1907 | 2409 | 2499 | ||
1908 | 2410 | if (idx == zstring::npos) | 2500 | if (idx == zstring::npos) |
1909 | @@ -2420,20 +2510,26 @@ | |||
1910 | 2420 | { | 2510 | { |
1911 | 2421 | prefix = strval.substr(0, idx); | 2511 | prefix = strval.substr(0, idx); |
1912 | 2422 | 2512 | ||
1915 | 2423 | if (!GenericCast::instance()->castableToNCName(prefix)) | 2513 | if (!GenericCast::castableToNCName(prefix)) |
1916 | 2424 | throwTypeException(err::FORG0001, errorInfo); | 2514 | { |
1917 | 2515 | RAISE_ERROR(err::FORG0001, errInfo.theLoc, | ||
1918 | 2516 | ERROR_PARAMS(ZED(FORG0001_PrefixNotNCName_2), prefix)); | ||
1919 | 2517 | } | ||
1920 | 2425 | 2518 | ||
1921 | 2426 | if (nsCtx) | 2519 | if (nsCtx) |
1922 | 2427 | { | 2520 | { |
1923 | 2428 | if (!nsCtx->findBinding(prefix, nsuri)) | 2521 | if (!nsCtx->findBinding(prefix, nsuri)) |
1925 | 2429 | throw XQUERY_EXCEPTION(err::FONS0004, ERROR_PARAMS(prefix)); | 2522 | RAISE_ERROR(err::FONS0004, errInfo.theLoc, ERROR_PARAMS(prefix)); |
1926 | 2430 | } | 2523 | } |
1927 | 2431 | 2524 | ||
1928 | 2432 | local = strval.substr(idx + 1); | 2525 | local = strval.substr(idx + 1); |
1929 | 2433 | } | 2526 | } |
1930 | 2434 | 2527 | ||
1933 | 2435 | if (!GenericCast::instance()->castableToNCName(local.c_str())) | 2528 | if (!GenericCast::castableToNCName(local)) |
1934 | 2436 | throwTypeException(err::FORG0001, errorInfo ); | 2529 | { |
1935 | 2530 | RAISE_ERROR(err::FORG0001, errInfo.theLoc, | ||
1936 | 2531 | ERROR_PARAMS(ZED(FORG0001_LocalNotNCName_2), local)); | ||
1937 | 2532 | } | ||
1938 | 2437 | 2533 | ||
1939 | 2438 | return GENV_ITEMFACTORY->createQName(result, nsuri, prefix, local); | 2534 | return GENV_ITEMFACTORY->createQName(result, nsuri, prefix, local); |
1940 | 2439 | } | 2535 | } |
1941 | 2440 | 2536 | ||
1942 | === modified file 'src/types/schema/XercesParseUtils.cpp' | |||
1943 | --- src/types/schema/XercesParseUtils.cpp 2012-09-19 21:16:15 +0000 | |||
1944 | +++ src/types/schema/XercesParseUtils.cpp 2013-01-11 00:47:24 +0000 | |||
1945 | @@ -67,9 +67,8 @@ | |||
1946 | 67 | } | 67 | } |
1947 | 68 | else | 68 | else |
1948 | 69 | { | 69 | { |
1952 | 70 | throw XQUERY_EXCEPTION( | 70 | throw XQUERY_EXCEPTION(err::FORG0001, |
1953 | 71 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "boolean" ) | 71 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:boolean")); |
1951 | 72 | ); | ||
1954 | 73 | } | 72 | } |
1955 | 74 | } | 73 | } |
1956 | 75 | 74 | ||
1957 | @@ -96,9 +95,8 @@ | |||
1958 | 96 | } | 95 | } |
1959 | 97 | else | 96 | else |
1960 | 98 | { | 97 | { |
1964 | 99 | throw XQUERY_EXCEPTION( | 98 | throw XQUERY_EXCEPTION(err::FORG0001, |
1965 | 100 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "integer" ) | 99 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:integer")); |
1963 | 101 | ); | ||
1966 | 102 | } | 100 | } |
1967 | 103 | } | 101 | } |
1968 | 104 | 102 | ||
1969 | @@ -125,10 +123,8 @@ | |||
1970 | 125 | } | 123 | } |
1971 | 126 | else | 124 | else |
1972 | 127 | { | 125 | { |
1977 | 128 | throw XQUERY_EXCEPTION( | 126 | throw XQUERY_EXCEPTION(err::FORG0001, |
1978 | 129 | err::FORG0001, | 127 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:positiveInteger")); |
1975 | 130 | ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "positiveInteger" ) | ||
1976 | 131 | ); | ||
1979 | 132 | } | 128 | } |
1980 | 133 | } | 129 | } |
1981 | 134 | 130 | ||
1982 | @@ -155,10 +151,8 @@ | |||
1983 | 155 | } | 151 | } |
1984 | 156 | else | 152 | else |
1985 | 157 | { | 153 | { |
1990 | 158 | throw XQUERY_EXCEPTION( | 154 | throw XQUERY_EXCEPTION(err::FORG0001, |
1991 | 159 | err::FORG0001, | 155 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:nonPositiveInteger")); |
1988 | 160 | ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "nonPositiveInteger" ) | ||
1989 | 161 | ); | ||
1992 | 162 | } | 156 | } |
1993 | 163 | } | 157 | } |
1994 | 164 | 158 | ||
1995 | @@ -185,13 +179,12 @@ | |||
1996 | 185 | } | 179 | } |
1997 | 186 | else | 180 | else |
1998 | 187 | { | 181 | { |
2003 | 188 | throw XQUERY_EXCEPTION( | 182 | throw XQUERY_EXCEPTION(err::FORG0001, |
2004 | 189 | err::FORG0001, | 183 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:negativeInteger")); |
2001 | 190 | ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "negativeInteger" ) | ||
2002 | 191 | ); | ||
2005 | 192 | } | 184 | } |
2006 | 193 | } | 185 | } |
2007 | 194 | 186 | ||
2008 | 187 | |||
2009 | 195 | bool XercesParseUtils::parseXSNonNegativeInteger( | 188 | bool XercesParseUtils::parseXSNonNegativeInteger( |
2010 | 196 | const zstring& textValue, | 189 | const zstring& textValue, |
2011 | 197 | store::Item_t &result) | 190 | store::Item_t &result) |
2012 | @@ -214,13 +207,12 @@ | |||
2013 | 214 | } | 207 | } |
2014 | 215 | else | 208 | else |
2015 | 216 | { | 209 | { |
2020 | 217 | throw XQUERY_EXCEPTION( | 210 | throw XQUERY_EXCEPTION(err::FORG0001, |
2021 | 218 | err::FORG0001, | 211 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:nonNegativeInteger")); |
2018 | 219 | ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "nonNegativeInteger" ) | ||
2019 | 220 | ); | ||
2022 | 221 | } | 212 | } |
2023 | 222 | } | 213 | } |
2024 | 223 | 214 | ||
2025 | 215 | |||
2026 | 224 | bool XercesParseUtils::parseXSUnsignedByte( | 216 | bool XercesParseUtils::parseXSUnsignedByte( |
2027 | 225 | const zstring& textValue, | 217 | const zstring& textValue, |
2028 | 226 | store::Item_t &result) | 218 | store::Item_t &result) |
2029 | @@ -243,13 +235,12 @@ | |||
2030 | 243 | } | 235 | } |
2031 | 244 | else | 236 | else |
2032 | 245 | { | 237 | { |
2037 | 246 | throw XQUERY_EXCEPTION( | 238 | throw XQUERY_EXCEPTION(err::FORG0001, |
2038 | 247 | err::FORG0001, | 239 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:unsignedByte")); |
2035 | 248 | ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "unsignedByte" ) | ||
2036 | 249 | ); | ||
2039 | 250 | } | 240 | } |
2040 | 251 | } | 241 | } |
2041 | 252 | 242 | ||
2042 | 243 | |||
2043 | 253 | bool XercesParseUtils::parseXSUnsignedShort( | 244 | bool XercesParseUtils::parseXSUnsignedShort( |
2044 | 254 | const zstring& textValue, | 245 | const zstring& textValue, |
2045 | 255 | store::Item_t &result) | 246 | store::Item_t &result) |
2046 | @@ -272,12 +263,12 @@ | |||
2047 | 272 | } | 263 | } |
2048 | 273 | else | 264 | else |
2049 | 274 | { | 265 | { |
2053 | 275 | throw XQUERY_EXCEPTION( | 266 | throw XQUERY_EXCEPTION(err::FORG0001, |
2054 | 276 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "unsignedShort" ) | 267 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:unsignedShort")); |
2052 | 277 | ); | ||
2055 | 278 | } | 268 | } |
2056 | 279 | } | 269 | } |
2057 | 280 | 270 | ||
2058 | 271 | |||
2059 | 281 | bool XercesParseUtils::parseXSUnsignedInt( | 272 | bool XercesParseUtils::parseXSUnsignedInt( |
2060 | 282 | const zstring& textValue, | 273 | const zstring& textValue, |
2061 | 283 | store::Item_t &result) | 274 | store::Item_t &result) |
2062 | @@ -300,14 +291,15 @@ | |||
2063 | 300 | } | 291 | } |
2064 | 301 | else | 292 | else |
2065 | 302 | { | 293 | { |
2069 | 303 | throw XQUERY_EXCEPTION( | 294 | throw XQUERY_EXCEPTION(err::FORG0001, |
2070 | 304 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "unsignedInt" ) | 295 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:unsignedInt")); |
2068 | 305 | ); | ||
2071 | 306 | } | 296 | } |
2072 | 307 | } | 297 | } |
2073 | 308 | 298 | ||
2074 | 299 | |||
2075 | 309 | bool XercesParseUtils::parseXSUnsignedLong( | 300 | bool XercesParseUtils::parseXSUnsignedLong( |
2077 | 310 | const zstring& textValue, store::Item_t &result) | 301 | const zstring& textValue, |
2078 | 302 | store::Item_t &result) | ||
2079 | 311 | { | 303 | { |
2080 | 312 | XMLCh* content = XMLString::transcode(textValue.c_str()); | 304 | XMLCh* content = XMLString::transcode(textValue.c_str()); |
2081 | 313 | XSValue::DataType datatype = XSValue::dt_unsignedLong; | 305 | XSValue::DataType datatype = XSValue::dt_unsignedLong; |
2082 | @@ -327,13 +319,12 @@ | |||
2083 | 327 | } | 319 | } |
2084 | 328 | else | 320 | else |
2085 | 329 | { | 321 | { |
2090 | 330 | throw XQUERY_EXCEPTION( | 322 | throw XQUERY_EXCEPTION(err::FORG0001, |
2091 | 331 | err::FORG0001, | 323 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:unsignedLong")); |
2088 | 332 | ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "unsignedLong" ) | ||
2089 | 333 | ); | ||
2092 | 334 | } | 324 | } |
2093 | 335 | } | 325 | } |
2094 | 336 | 326 | ||
2095 | 327 | |||
2096 | 337 | bool XercesParseUtils::parseXSByte( | 328 | bool XercesParseUtils::parseXSByte( |
2097 | 338 | const zstring& textValue, | 329 | const zstring& textValue, |
2098 | 339 | store::Item_t &result) | 330 | store::Item_t &result) |
2099 | @@ -356,12 +347,12 @@ | |||
2100 | 356 | } | 347 | } |
2101 | 357 | else | 348 | else |
2102 | 358 | { | 349 | { |
2106 | 359 | throw XQUERY_EXCEPTION( | 350 | throw XQUERY_EXCEPTION(err::FORG0001, |
2107 | 360 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "byte" ) | 351 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:byte")); |
2105 | 361 | ); | ||
2108 | 362 | } | 352 | } |
2109 | 363 | } | 353 | } |
2110 | 364 | 354 | ||
2111 | 355 | |||
2112 | 365 | bool XercesParseUtils::parseXSShort( | 356 | bool XercesParseUtils::parseXSShort( |
2113 | 366 | const zstring& textValue, | 357 | const zstring& textValue, |
2114 | 367 | store::Item_t &result) | 358 | store::Item_t &result) |
2115 | @@ -384,12 +375,12 @@ | |||
2116 | 384 | } | 375 | } |
2117 | 385 | else | 376 | else |
2118 | 386 | { | 377 | { |
2122 | 387 | throw XQUERY_EXCEPTION( | 378 | throw XQUERY_EXCEPTION(err::FORG0001, |
2123 | 388 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "short" ) | 379 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:short")); |
2121 | 389 | ); | ||
2124 | 390 | } | 380 | } |
2125 | 391 | } | 381 | } |
2126 | 392 | 382 | ||
2127 | 383 | |||
2128 | 393 | bool XercesParseUtils::parseXSInt( | 384 | bool XercesParseUtils::parseXSInt( |
2129 | 394 | const zstring& textValue, | 385 | const zstring& textValue, |
2130 | 395 | store::Item_t &result) | 386 | store::Item_t &result) |
2131 | @@ -412,12 +403,12 @@ | |||
2132 | 412 | } | 403 | } |
2133 | 413 | else | 404 | else |
2134 | 414 | { | 405 | { |
2138 | 415 | throw XQUERY_EXCEPTION( | 406 | throw XQUERY_EXCEPTION(err::FORG0001, |
2139 | 416 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "int" ) | 407 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:int")); |
2137 | 417 | ); | ||
2140 | 418 | } | 408 | } |
2141 | 419 | } | 409 | } |
2142 | 420 | 410 | ||
2143 | 411 | |||
2144 | 421 | bool XercesParseUtils::parseXSLong( | 412 | bool XercesParseUtils::parseXSLong( |
2145 | 422 | const zstring& textValue, | 413 | const zstring& textValue, |
2146 | 423 | store::Item_t &result) | 414 | store::Item_t &result) |
2147 | @@ -440,12 +431,12 @@ | |||
2148 | 440 | } | 431 | } |
2149 | 441 | else | 432 | else |
2150 | 442 | { | 433 | { |
2154 | 443 | throw XQUERY_EXCEPTION( | 434 | throw XQUERY_EXCEPTION(err::FORG0001, |
2155 | 444 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "long" ) | 435 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:long")); |
2153 | 445 | ); | ||
2156 | 446 | } | 436 | } |
2157 | 447 | } | 437 | } |
2158 | 448 | 438 | ||
2159 | 439 | |||
2160 | 449 | bool XercesParseUtils::parseXSFloat( | 440 | bool XercesParseUtils::parseXSFloat( |
2161 | 450 | const zstring& textValue, | 441 | const zstring& textValue, |
2162 | 451 | store::Item_t &result) | 442 | store::Item_t &result) |
2163 | @@ -470,7 +461,8 @@ | |||
2164 | 470 | //textValue = textValue.trim(" \n\r\t",4); | 461 | //textValue = textValue.trim(" \n\r\t",4); |
2165 | 471 | zstring textValue2; | 462 | zstring textValue2; |
2166 | 472 | utf8::normalize_whitespace(textValue, &textValue2); | 463 | utf8::normalize_whitespace(textValue, &textValue2); |
2168 | 473 | try { | 464 | try |
2169 | 465 | { | ||
2170 | 474 | xs_float const n(textValue2.c_str()); | 466 | xs_float const n(textValue2.c_str()); |
2171 | 475 | return GENV_ITEMFACTORY->createFloat(result, n); | 467 | return GENV_ITEMFACTORY->createFloat(result, n); |
2172 | 476 | } | 468 | } |
2173 | @@ -479,11 +471,11 @@ | |||
2174 | 479 | } | 471 | } |
2175 | 480 | } | 472 | } |
2176 | 481 | 473 | ||
2180 | 482 | throw XQUERY_EXCEPTION( | 474 | throw XQUERY_EXCEPTION(err::FORG0001, |
2181 | 483 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "float" ) | 475 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:float")); |
2179 | 484 | ); | ||
2182 | 485 | } | 476 | } |
2183 | 486 | 477 | ||
2184 | 478 | |||
2185 | 487 | bool XercesParseUtils::parseXSDouble( | 479 | bool XercesParseUtils::parseXSDouble( |
2186 | 488 | const zstring& textValue, | 480 | const zstring& textValue, |
2187 | 489 | store::Item_t &result) | 481 | store::Item_t &result) |
2188 | @@ -517,11 +509,11 @@ | |||
2189 | 517 | } | 509 | } |
2190 | 518 | } | 510 | } |
2191 | 519 | 511 | ||
2195 | 520 | throw XQUERY_EXCEPTION( | 512 | throw XQUERY_EXCEPTION(err::FORG0001, |
2196 | 521 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "double" ) | 513 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:double")); |
2194 | 522 | ); | ||
2197 | 523 | } | 514 | } |
2198 | 524 | 515 | ||
2199 | 516 | |||
2200 | 525 | bool XercesParseUtils::parseXSDecimal( | 517 | bool XercesParseUtils::parseXSDecimal( |
2201 | 526 | const zstring& textValue, | 518 | const zstring& textValue, |
2202 | 527 | store::Item_t &result) | 519 | store::Item_t &result) |
2203 | @@ -542,12 +534,12 @@ | |||
2204 | 542 | } | 534 | } |
2205 | 543 | else | 535 | else |
2206 | 544 | { | 536 | { |
2210 | 545 | throw XQUERY_EXCEPTION( | 537 | throw XQUERY_EXCEPTION(err::FORG0001, |
2211 | 546 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "decimal" ) | 538 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:decimal")); |
2209 | 547 | ); | ||
2212 | 548 | } | 539 | } |
2213 | 549 | } | 540 | } |
2214 | 550 | 541 | ||
2215 | 542 | |||
2216 | 551 | // string types | 543 | // string types |
2217 | 552 | bool XercesParseUtils::parseXSString( | 544 | bool XercesParseUtils::parseXSString( |
2218 | 553 | const zstring& textValue, | 545 | const zstring& textValue, |
2219 | @@ -560,6 +552,7 @@ | |||
2220 | 560 | return factory->createString(result, textValue2); | 552 | return factory->createString(result, textValue2); |
2221 | 561 | } | 553 | } |
2222 | 562 | 554 | ||
2223 | 555 | |||
2224 | 563 | bool XercesParseUtils::parseXSNormalizedString( | 556 | bool XercesParseUtils::parseXSNormalizedString( |
2225 | 564 | const zstring& textValue, | 557 | const zstring& textValue, |
2226 | 565 | store::Item_t &result) | 558 | store::Item_t &result) |
2227 | @@ -600,9 +593,8 @@ | |||
2228 | 600 | } | 593 | } |
2229 | 601 | else | 594 | else |
2230 | 602 | { | 595 | { |
2234 | 603 | throw XQUERY_EXCEPTION( | 596 | throw XQUERY_EXCEPTION(err::FORG0001, |
2235 | 604 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "NMToken" ) | 597 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:NMToken")); |
2233 | 605 | ); | ||
2236 | 606 | } | 598 | } |
2237 | 607 | } | 599 | } |
2238 | 608 | 600 | ||
2239 | @@ -629,9 +621,8 @@ | |||
2240 | 629 | } | 621 | } |
2241 | 630 | else | 622 | else |
2242 | 631 | { | 623 | { |
2246 | 632 | throw XQUERY_EXCEPTION( | 624 | throw XQUERY_EXCEPTION(err::FORG0001, |
2247 | 633 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "NMToken" ) | 625 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:NMToken")); |
2245 | 634 | ); | ||
2248 | 635 | } | 626 | } |
2249 | 636 | } | 627 | } |
2250 | 637 | 628 | ||
2251 | @@ -659,9 +650,8 @@ | |||
2252 | 659 | } | 650 | } |
2253 | 660 | else | 651 | else |
2254 | 661 | { | 652 | { |
2258 | 662 | throw XQUERY_EXCEPTION( | 653 | throw XQUERY_EXCEPTION(err::FORG0001, |
2259 | 663 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "Name" ) | 654 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:Name")); |
2257 | 664 | ); | ||
2260 | 665 | } | 655 | } |
2261 | 666 | } | 656 | } |
2262 | 667 | 657 | ||
2263 | @@ -688,9 +678,8 @@ | |||
2264 | 688 | } | 678 | } |
2265 | 689 | else | 679 | else |
2266 | 690 | { | 680 | { |
2270 | 691 | throw XQUERY_EXCEPTION( | 681 | throw XQUERY_EXCEPTION(err::FORG0001, |
2271 | 692 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "NCName" ) | 682 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:NCName")); |
2269 | 693 | ); | ||
2272 | 694 | } | 683 | } |
2273 | 695 | } | 684 | } |
2274 | 696 | 685 | ||
2275 | @@ -717,9 +706,8 @@ | |||
2276 | 717 | } | 706 | } |
2277 | 718 | else | 707 | else |
2278 | 719 | { | 708 | { |
2282 | 720 | throw XQUERY_EXCEPTION( | 709 | throw XQUERY_EXCEPTION(err::FORG0001, |
2283 | 721 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "ID" ) | 710 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:ID")); |
2281 | 722 | ); | ||
2284 | 723 | } | 711 | } |
2285 | 724 | } | 712 | } |
2286 | 725 | 713 | ||
2287 | @@ -746,9 +734,8 @@ | |||
2288 | 746 | } | 734 | } |
2289 | 747 | else | 735 | else |
2290 | 748 | { | 736 | { |
2294 | 749 | throw XQUERY_EXCEPTION( | 737 | throw XQUERY_EXCEPTION(err::FORG0001, |
2295 | 750 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "IDREF" ) | 738 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:IDREF")); |
2293 | 751 | ); | ||
2296 | 752 | } | 739 | } |
2297 | 753 | } | 740 | } |
2298 | 754 | 741 | ||
2299 | @@ -775,9 +762,8 @@ | |||
2300 | 775 | } | 762 | } |
2301 | 776 | else | 763 | else |
2302 | 777 | { | 764 | { |
2306 | 778 | throw XQUERY_EXCEPTION( | 765 | throw XQUERY_EXCEPTION(err::FORG0001, |
2307 | 779 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "ENTITY" ) | 766 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:ENTITY")); |
2305 | 780 | ); | ||
2308 | 781 | } | 767 | } |
2309 | 782 | } | 768 | } |
2310 | 783 | 769 | ||
2311 | @@ -804,9 +790,8 @@ | |||
2312 | 804 | } | 790 | } |
2313 | 805 | else | 791 | else |
2314 | 806 | { | 792 | { |
2318 | 807 | throw XQUERY_EXCEPTION( | 793 | throw XQUERY_EXCEPTION(err::FORG0001, |
2319 | 808 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "NOTATION" ) | 794 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:NOTATION")); |
2317 | 809 | ); | ||
2320 | 810 | } | 795 | } |
2321 | 811 | } | 796 | } |
2322 | 812 | 797 | ||
2323 | @@ -855,9 +840,8 @@ | |||
2324 | 855 | } | 840 | } |
2325 | 856 | } | 841 | } |
2326 | 857 | 842 | ||
2330 | 858 | throw XQUERY_EXCEPTION( | 843 | throw XQUERY_EXCEPTION(err::FORG0001, |
2331 | 859 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "dateTime" ) | 844 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:dateTime")); |
2329 | 860 | ); | ||
2332 | 861 | } | 845 | } |
2333 | 862 | 846 | ||
2334 | 863 | 847 | ||
2335 | @@ -896,9 +880,8 @@ | |||
2336 | 896 | } | 880 | } |
2337 | 897 | } | 881 | } |
2338 | 898 | 882 | ||
2342 | 899 | throw XQUERY_EXCEPTION( | 883 | throw XQUERY_EXCEPTION(err::FORG0001, |
2343 | 900 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "date" ) | 884 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:date")); |
2341 | 901 | ); | ||
2344 | 902 | } | 885 | } |
2345 | 903 | 886 | ||
2346 | 904 | 887 | ||
2347 | @@ -942,9 +925,8 @@ | |||
2348 | 942 | } | 925 | } |
2349 | 943 | } | 926 | } |
2350 | 944 | 927 | ||
2354 | 945 | throw XQUERY_EXCEPTION( | 928 | throw XQUERY_EXCEPTION(err::FORG0001, |
2355 | 946 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "time" ) | 929 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:time")); |
2353 | 947 | ); | ||
2356 | 948 | } | 930 | } |
2357 | 949 | 931 | ||
2358 | 950 | 932 | ||
2359 | @@ -978,9 +960,8 @@ | |||
2360 | 978 | } | 960 | } |
2361 | 979 | } | 961 | } |
2362 | 980 | 962 | ||
2366 | 981 | throw XQUERY_EXCEPTION( | 963 | throw XQUERY_EXCEPTION(err::FORG0001, |
2367 | 982 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "gYearMonth" ) | 964 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:gYearMonth")); |
2365 | 983 | ); | ||
2368 | 984 | } | 965 | } |
2369 | 985 | 966 | ||
2370 | 986 | 967 | ||
2371 | @@ -1013,9 +994,8 @@ | |||
2372 | 1013 | } | 994 | } |
2373 | 1014 | } | 995 | } |
2374 | 1015 | 996 | ||
2378 | 1016 | throw XQUERY_EXCEPTION( | 997 | throw XQUERY_EXCEPTION(err::FORG0001, |
2379 | 1017 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "gYear" ) | 998 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:gYear")); |
2377 | 1018 | ); | ||
2380 | 1019 | } | 999 | } |
2381 | 1020 | 1000 | ||
2382 | 1021 | 1001 | ||
2383 | @@ -1048,9 +1028,8 @@ | |||
2384 | 1048 | } | 1028 | } |
2385 | 1049 | } | 1029 | } |
2386 | 1050 | 1030 | ||
2390 | 1051 | throw XQUERY_EXCEPTION( | 1031 | throw XQUERY_EXCEPTION(err::FORG0001, |
2391 | 1052 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "gMonthDay" ) | 1032 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:gMonthDay")); |
2389 | 1053 | ); | ||
2392 | 1054 | } | 1033 | } |
2393 | 1055 | 1034 | ||
2394 | 1056 | 1035 | ||
2395 | @@ -1082,9 +1061,8 @@ | |||
2396 | 1082 | } | 1061 | } |
2397 | 1083 | } | 1062 | } |
2398 | 1084 | 1063 | ||
2402 | 1085 | throw XQUERY_EXCEPTION( | 1064 | throw XQUERY_EXCEPTION(err::FORG0001, |
2403 | 1086 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "gDay" ) | 1065 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:gDay")); |
2401 | 1087 | ); | ||
2404 | 1088 | } | 1066 | } |
2405 | 1089 | 1067 | ||
2406 | 1090 | 1068 | ||
2407 | @@ -1116,9 +1094,8 @@ | |||
2408 | 1116 | } | 1094 | } |
2409 | 1117 | } | 1095 | } |
2410 | 1118 | 1096 | ||
2414 | 1119 | throw XQUERY_EXCEPTION( | 1097 | throw XQUERY_EXCEPTION(err::FORG0001, |
2415 | 1120 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "gDay" ) | 1098 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:gDay")); |
2413 | 1121 | ); | ||
2416 | 1122 | } | 1099 | } |
2417 | 1123 | 1100 | ||
2418 | 1124 | 1101 | ||
2419 | @@ -1154,9 +1131,8 @@ | |||
2420 | 1154 | return factory->createDuration(result, &tValue); | 1131 | return factory->createDuration(result, &tValue); |
2421 | 1155 | } | 1132 | } |
2422 | 1156 | 1133 | ||
2426 | 1157 | throw XQUERY_EXCEPTION( | 1134 | throw XQUERY_EXCEPTION(err::FORG0001, |
2427 | 1158 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "duration" ) | 1135 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:duration")); |
2425 | 1159 | ); | ||
2428 | 1160 | } | 1136 | } |
2429 | 1161 | 1137 | ||
2430 | 1162 | 1138 | ||
2431 | @@ -1172,10 +1148,8 @@ | |||
2432 | 1172 | return factory->createYearMonthDuration(result, &d); | 1148 | return factory->createYearMonthDuration(result, &d); |
2433 | 1173 | } | 1149 | } |
2434 | 1174 | 1150 | ||
2439 | 1175 | throw XQUERY_EXCEPTION( | 1151 | throw XQUERY_EXCEPTION(err::FORG0001, |
2440 | 1176 | err::FORG0001, | 1152 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:yearMonthDuration")); |
2437 | 1177 | ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "yearMonthDuration" ) | ||
2438 | 1178 | ); | ||
2441 | 1179 | } | 1153 | } |
2442 | 1180 | 1154 | ||
2443 | 1181 | 1155 | ||
2444 | @@ -1191,10 +1165,8 @@ | |||
2445 | 1191 | return factory->createDayTimeDuration(result, &d); | 1165 | return factory->createDayTimeDuration(result, &d); |
2446 | 1192 | } | 1166 | } |
2447 | 1193 | 1167 | ||
2452 | 1194 | throw XQUERY_EXCEPTION( | 1168 | throw XQUERY_EXCEPTION(err::FORG0001, |
2453 | 1195 | err::FORG0001, | 1169 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:dayTimeDuration")); |
2450 | 1196 | ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "dayTimeDuration" ) | ||
2451 | 1197 | ); | ||
2454 | 1198 | } | 1170 | } |
2455 | 1199 | 1171 | ||
2456 | 1200 | 1172 | ||
2457 | @@ -1241,10 +1213,8 @@ | |||
2458 | 1241 | return factory->createBase64Binary(result, tValue); | 1213 | return factory->createBase64Binary(result, tValue); |
2459 | 1242 | } | 1214 | } |
2460 | 1243 | 1215 | ||
2465 | 1244 | throw XQUERY_EXCEPTION( | 1216 | throw XQUERY_EXCEPTION(err::FORG0001, |
2466 | 1245 | err::FORG0001, | 1217 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:base64Binary")); |
2463 | 1246 | ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "base64Binary" ) | ||
2464 | 1247 | ); | ||
2467 | 1248 | } | 1218 | } |
2468 | 1249 | 1219 | ||
2469 | 1250 | 1220 | ||
2470 | @@ -1269,9 +1239,8 @@ | |||
2471 | 1269 | return factory->createHexBinary(result, tValue); | 1239 | return factory->createHexBinary(result, tValue); |
2472 | 1270 | } | 1240 | } |
2473 | 1271 | 1241 | ||
2477 | 1272 | throw XQUERY_EXCEPTION( | 1242 | throw XQUERY_EXCEPTION(err::FORG0001, |
2478 | 1273 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "hexBinary" ) | 1243 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:hexBinary")); |
2476 | 1274 | ); | ||
2479 | 1275 | } | 1244 | } |
2480 | 1276 | 1245 | ||
2481 | 1277 | 1246 | ||
2482 | @@ -1296,9 +1265,8 @@ | |||
2483 | 1296 | return factory->createAnyURI(result, textValue2); | 1265 | return factory->createAnyURI(result, textValue2); |
2484 | 1297 | } | 1266 | } |
2485 | 1298 | 1267 | ||
2489 | 1299 | throw XQUERY_EXCEPTION( | 1268 | throw XQUERY_EXCEPTION(err::FORG0001, |
2490 | 1300 | err::FORG0001, ERROR_PARAMS( textValue, ZED( NoCastTo_34o ), "anyURI" ) | 1269 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, "xs:anyURI")); |
2488 | 1301 | ); | ||
2491 | 1302 | } | 1270 | } |
2492 | 1303 | 1271 | ||
2493 | 1304 | 1272 | ||
2494 | 1305 | 1273 | ||
2495 | === modified file 'src/types/schema/schema.cpp' | |||
2496 | --- src/types/schema/schema.cpp 2013-01-08 08:34:08 +0000 | |||
2497 | +++ src/types/schema/schema.cpp 2013-01-11 00:47:24 +0000 | |||
2498 | @@ -1691,7 +1691,7 @@ | |||
2499 | 1691 | if (!xsiTypeDV) | 1691 | if (!xsiTypeDV) |
2500 | 1692 | { | 1692 | { |
2501 | 1693 | RAISE_ERROR(err::FORG0001, loc, | 1693 | RAISE_ERROR(err::FORG0001, loc, |
2503 | 1694 | ERROR_PARAMS(targetType, ZED(NoTypeInCtx))); | 1694 | ERROR_PARAMS(ZED(FORG0001_NoTypeInCtx_2), targetType->toSchemaString())); |
2504 | 1695 | } | 1695 | } |
2505 | 1696 | 1696 | ||
2506 | 1697 | // workaround for validating xs:NOTATION with Xerces | 1697 | // workaround for validating xs:NOTATION with Xerces |
2507 | @@ -1712,8 +1712,8 @@ | |||
2508 | 1712 | } | 1712 | } |
2509 | 1713 | else | 1713 | else |
2510 | 1714 | { | 1714 | { |
2513 | 1715 | ZORBA_ERROR_DESC_OSS(err::FORG0001, "Prefix '" << prefix << | 1715 | RAISE_ERROR(err::FORG0001, loc, |
2514 | 1716 | "' not found in current namespace context."); | 1716 | ERROR_PARAMS(ZED(FORG0001_PrefixNotBound_2), prefix)); |
2515 | 1717 | } | 1717 | } |
2516 | 1718 | } | 1718 | } |
2517 | 1719 | else | 1719 | else |
2518 | @@ -1725,7 +1725,7 @@ | |||
2519 | 1725 | else | 1725 | else |
2520 | 1726 | { | 1726 | { |
2521 | 1727 | RAISE_ERROR(err::FORG0001, loc, | 1727 | RAISE_ERROR(err::FORG0001, loc, |
2523 | 1728 | ERROR_PARAMS(targetType, ZED(NoTypeInCtx))); | 1728 | ERROR_PARAMS(ZED(FORG0001_NoTypeInCtx_2), targetType->toSchemaString())); |
2524 | 1729 | } | 1729 | } |
2525 | 1730 | } | 1730 | } |
2526 | 1731 | catch (XMLException& idve) | 1731 | catch (XMLException& idve) |
2527 | @@ -1734,7 +1734,10 @@ | |||
2528 | 1734 | transcode(idve.getMessage(), msg); | 1734 | transcode(idve.getMessage(), msg); |
2529 | 1735 | 1735 | ||
2530 | 1736 | RAISE_ERROR(err::FORG0001, loc, | 1736 | RAISE_ERROR(err::FORG0001, loc, |
2532 | 1737 | ERROR_PARAMS(textValue, ZED(NoCastTo_34o), targetType, msg)); | 1737 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), |
2533 | 1738 | textValue, | ||
2534 | 1739 | targetType->toSchemaString(), | ||
2535 | 1740 | msg)); | ||
2536 | 1738 | } | 1741 | } |
2537 | 1739 | catch(const OutOfMemoryException&) | 1742 | catch(const OutOfMemoryException&) |
2538 | 1740 | { | 1743 | { |
2539 | @@ -1831,7 +1834,7 @@ | |||
2540 | 1831 | if (atomicTextValues.empty()) | 1834 | if (atomicTextValues.empty()) |
2541 | 1832 | { | 1835 | { |
2542 | 1833 | RAISE_ERROR(err::FORG0001, loc, | 1836 | RAISE_ERROR(err::FORG0001, loc, |
2544 | 1834 | ERROR_PARAMS(textValue, ZED(NoCastTo_34o), udt->toSchemaString())); | 1837 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, udt->toSchemaString())); |
2545 | 1835 | } | 1838 | } |
2546 | 1836 | 1839 | ||
2547 | 1837 | for (csize i = 0; i < atomicTextValues.size() ; ++i) | 1840 | for (csize i = 0; i < atomicTextValues.size() ; ++i) |
2548 | @@ -1881,7 +1884,7 @@ | |||
2549 | 1881 | } | 1884 | } |
2550 | 1882 | 1885 | ||
2551 | 1883 | RAISE_ERROR(err::FORG0001, loc, | 1886 | RAISE_ERROR(err::FORG0001, loc, |
2553 | 1884 | ERROR_PARAMS(textValue, ZED(NoCastTo_34o), udt->toSchemaString())); | 1887 | ERROR_PARAMS(ZED(FORG0001_NoCastTo_234o), textValue, udt->toSchemaString())); |
2554 | 1885 | } | 1888 | } |
2555 | 1886 | 1889 | ||
2556 | 1887 | 1890 | ||
2557 | @@ -1906,8 +1909,7 @@ | |||
2558 | 1906 | const UserDefinedXQType* udXQType = | 1909 | const UserDefinedXQType* udXQType = |
2559 | 1907 | static_cast<const UserDefinedXQType*>(aTargetType.getp()); | 1910 | static_cast<const UserDefinedXQType*>(aTargetType.getp()); |
2560 | 1908 | 1911 | ||
2563 | 1909 | ZORBA_ASSERT( udXQType->isAtomic() || udXQType->isList() || | 1912 | ZORBA_ASSERT(udXQType->isAtomic() || udXQType->isList() || udXQType->isUnion()); |
2562 | 1910 | udXQType->isUnion() ); | ||
2564 | 1911 | 1913 | ||
2565 | 1912 | 1914 | ||
2566 | 1913 | switch ( udXQType->getTypeCategory() ) | 1915 | switch ( udXQType->getTypeCategory() ) |
2567 | 1914 | 1916 | ||
2568 | === modified file 'src/zorbatypes/URI.cpp' | |||
2569 | --- src/zorbatypes/URI.cpp 2012-09-19 21:16:15 +0000 | |||
2570 | +++ src/zorbatypes/URI.cpp 2013-01-11 00:47:24 +0000 | |||
2571 | @@ -945,26 +945,30 @@ | |||
2572 | 945 | { | 945 | { |
2573 | 946 | if ( lIndex + 2 >= lEnd ) | 946 | if ( lIndex + 2 >= lEnd ) |
2574 | 947 | { | 947 | { |
2578 | 948 | throw XQUERY_EXCEPTION( | 948 | throw XQUERY_EXCEPTION(err::XQST0046, |
2579 | 949 | err::XQST0046, ERROR_PARAMS( uri, ZED( BadHexSequence ) ) | 949 | ERROR_PARAMS(uri, ZED(BadHexSequence))); |
2577 | 950 | ); | ||
2580 | 951 | } | 950 | } |
2581 | 951 | |||
2582 | 952 | unicode::code_point lHex1 = lCodepoints[++lIndex]; | 952 | unicode::code_point lHex1 = lCodepoints[++lIndex]; |
2587 | 953 | if(!ascii::is_xdigit(lHex1)) | 953 | |
2588 | 954 | throw XQUERY_EXCEPTION( | 954 | if (!ascii::is_xdigit(lHex1)) |
2589 | 955 | err::XQST0046, ERROR_PARAMS( uri, ZED( BadHexDigit_3 ), lHex1 ) | 955 | { |
2590 | 956 | ); | 956 | throw XQUERY_EXCEPTION(err::XQST0046, |
2591 | 957 | ERROR_PARAMS(uri, ZED(XQST0046_BadHexDigit_3), lHex1)); | ||
2592 | 958 | } | ||
2593 | 959 | |||
2594 | 957 | unicode::code_point lHex2 = lCodepoints[++lIndex]; | 960 | unicode::code_point lHex2 = lCodepoints[++lIndex]; |
2599 | 958 | if(!ascii::is_xdigit(lHex2)) | 961 | |
2600 | 959 | throw XQUERY_EXCEPTION( | 962 | if (!ascii::is_xdigit(lHex2)) |
2601 | 960 | err::XQST0046, ERROR_PARAMS( uri, ZED( BadHexDigit_3 ), lHex2 ) | 963 | { |
2602 | 961 | ); | 964 | throw XQUERY_EXCEPTION(err::XQST0046, |
2603 | 965 | ERROR_PARAMS(uri, ZED(XQST0046_BadHexDigit_3), lHex2)); | ||
2604 | 966 | } | ||
2605 | 962 | } | 967 | } |
2606 | 963 | else if (!is_unreserved_char(lCp) && !is_path_character(lCp) && valid) | 968 | else if (!is_unreserved_char(lCp) && !is_path_character(lCp) && valid) |
2607 | 964 | { | 969 | { |
2611 | 965 | throw XQUERY_EXCEPTION( | 970 | throw XQUERY_EXCEPTION(err::XQST0046, |
2612 | 966 | err::XQST0046, ERROR_PARAMS( uri, ZED( BadUnicodeChar_3 ), lCp ) | 971 | ERROR_PARAMS(uri, ZED(BadUnicodeChar_3), lCp)); |
2610 | 967 | ); | ||
2613 | 968 | } | 972 | } |
2614 | 969 | ++lIndex; | 973 | ++lIndex; |
2615 | 970 | } | 974 | } |
2616 | 971 | 975 | ||
2617 | === modified file 'src/zorbatypes/binary.cpp' | |||
2618 | --- src/zorbatypes/binary.cpp 2012-09-19 21:16:15 +0000 | |||
2619 | +++ src/zorbatypes/binary.cpp 2013-01-11 00:47:24 +0000 | |||
2620 | @@ -28,16 +28,16 @@ | |||
2621 | 28 | #include "util/base64_util.h" | 28 | #include "util/base64_util.h" |
2622 | 29 | #include "util/stl_util.h" | 29 | #include "util/stl_util.h" |
2623 | 30 | 30 | ||
2634 | 31 | #define CATCH_BASE64_EXCEPTION() \ | 31 | #define CATCH_BASE64_EXCEPTION() \ |
2635 | 32 | catch ( base64::exception const &e ) { \ | 32 | catch (const base64::exception& e) \ |
2636 | 33 | throw XQUERY_EXCEPTION( \ | 33 | { \ |
2637 | 34 | err::FORG0001, ERROR_PARAMS( e.invalid_char(), ZED( Base64BadChar ) ) \ | 34 | throw XQUERY_EXCEPTION(err::FORG0001, \ |
2638 | 35 | ); \ | 35 | ERROR_PARAMS(ZED(FORG0001_Base64BadChar_2), e.invalid_char())); \ |
2639 | 36 | } \ | 36 | } \ |
2640 | 37 | catch ( std::invalid_argument const& ) { \ | 37 | catch (const std::invalid_argument& ) \ |
2641 | 38 | throw XQUERY_EXCEPTION( \ | 38 | { \ |
2642 | 39 | err::FORG0001, ERROR_PARAMS( "", ZED( Base64Multiple4 ) ) \ | 39 | throw XQUERY_EXCEPTION(err::FORG0001, \ |
2643 | 40 | ); \ | 40 | ERROR_PARAMS(ZED(FORG0001_Base64Multiple4))); \ |
2644 | 41 | } | 41 | } |
2645 | 42 | 42 | ||
2646 | 43 | using namespace std; | 43 | using namespace std; |
2647 | @@ -330,9 +330,8 @@ | |||
2648 | 330 | 330 | ||
2649 | 331 | if (len % 2 != 0) | 331 | if (len % 2 != 0) |
2650 | 332 | { | 332 | { |
2654 | 333 | throw XQUERY_EXCEPTION( | 333 | throw XQUERY_EXCEPTION(err::FORG0001, |
2655 | 334 | err::FORG0001, ERROR_PARAMS( "", ZED( HexBinaryMustBeEven ) ) | 334 | ERROR_PARAMS(ZED(FORG0001_HexBinaryMustBeEven))); |
2653 | 335 | ); | ||
2656 | 336 | } | 335 | } |
2657 | 337 | 336 | ||
2658 | 338 | for (size_t i = 0; i < len; ++i) | 337 | for (size_t i = 0; i < len; ++i) |
2659 | @@ -349,9 +348,8 @@ | |||
2660 | 349 | } | 348 | } |
2661 | 350 | else | 349 | else |
2662 | 351 | { | 350 | { |
2666 | 352 | throw XQUERY_EXCEPTION( | 351 | throw XQUERY_EXCEPTION(err::FORG0001, |
2667 | 353 | err::FORG0001, ERROR_PARAMS( lChar, ZED( BadHexDigit_3 ), lChar ) | 352 | ERROR_PARAMS(ZED(FORG0001_BadHexDigit_2), lChar)); |
2665 | 354 | ); | ||
2668 | 355 | } | 353 | } |
2669 | 356 | } | 354 | } |
2670 | 357 | } | 355 | } |
2671 | 358 | 356 | ||
2672 | === modified file 'test/rbkt/ExpQueryResults/zorba/trycatch/trycatch4.xml.res' | |||
2673 | --- test/rbkt/ExpQueryResults/zorba/trycatch/trycatch4.xml.res 2012-09-19 21:16:15 +0000 | |||
2674 | +++ test/rbkt/ExpQueryResults/zorba/trycatch/trycatch4.xml.res 2013-01-11 00:47:24 +0000 | |||
2675 | @@ -1,1 +1,1 @@ | |||
2677 | 1 | Ha! It worked err:FORG0001 "xs:string": invalid value for cast/constructor: can not cast to "xs:integer" | 1 | Ha! It worked err:FORG0001 "a": value of type xs:string is not castable to type xs:integer |
Validation queue starting for merge proposal. zorbatest. lambda. nu:8080/ remotequeue/ markos- scratch- 2013-01- 10T19-34- 59.262Z/ log.html
Log at: http://