Merge lp:~paul-lucas/zorba/bug-867027 into lp:zorba

Proposed by Paul J. Lucas
Status: Merged
Approved by: Matthias Brantner
Approved revision: 11224
Merged at revision: 11226
Proposed branch: lp:~paul-lucas/zorba/bug-867027
Merge into: lp:zorba
Diff against target: 504 lines (+147/-76)
11 files modified
ChangeLog (+1/-0)
include/zorba/pregenerated/diagnostic_list.h (+6/-0)
modules/com/zorba-xquery/www/modules/pregenerated/errors.xq (+12/-0)
modules/w3c/pregenerated/xqt-errors.xq (+4/-4)
src/compiler/translator/translator.cpp (+39/-5)
src/diagnostics/diagnostic_en.xml (+26/-19)
src/diagnostics/pregenerated/diagnostic_list.cpp (+9/-0)
src/diagnostics/pregenerated/dict_en.cpp (+6/-3)
src/diagnostics/pregenerated/dict_zed_keys.h (+2/-2)
src/types/schema/LoadSchemaErrorHandler.cpp (+19/-31)
src/types/schema/schema.cpp (+23/-12)
To merge this branch: bzr merge lp:~paul-lucas/zorba/bug-867027
Reviewer Review Type Date Requested Status
Matthias Brantner Approve
Paul J. Lucas Approve
Review via email: mp+147257@code.launchpad.net

Commit message

Created new error codes to handle errors other than what XQST0059 was intended for.

Description of the change

Created new error codes to handle errors other than what XQST0059 was intended for.

To post a comment you must log in.
Revision history for this message
Paul J. Lucas (paul-lucas) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~paul-lucas/zorba/bug-867027 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job bug-867027-2013-02-08T00-17-47.56Z is finished. The
  final status was:

  3 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~paul-lucas/zorba/bug-867027 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job bug-867027-2013-02-08T02-02-45.912Z is finished. The
  final status was:

  No tests were run - build or configure step must have failed.

  Not commiting changes.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

The attempt to merge lp:~paul-lucas/zorba/bug-867027 into lp:zorba failed. Below is the output from the failed tests.

CMake Error at /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake:275 (message):
  Validation queue job bug-867027-2013-02-08T02-16-36.507Z is finished. The
  final status was:

  1 tests did not succeed - changes not commited.

Error in read script: /home/ceej/zo/testing/zorbatest/tester/TarmacLander.cmake

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-867027-2013-02-08T02-59-35.99Z is finished. The final status was:

All tests succeeded!

Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Voting does not meet specified criteria. Required: Approve > 1, Disapprove < 1, Needs Fixing < 1, Pending < 1. Got: 1 Approve, 1 Pending.

Revision history for this message
Matthias Brantner (matthias-brantner) :
review: Approve
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :
Revision history for this message
Zorba Build Bot (zorba-buildbot) wrote :

Validation queue job bug-867027-2013-02-08T18-05-42.189Z is finished. The final status was:

All tests succeeded!

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'ChangeLog'
--- ChangeLog 2013-02-03 17:44:39 +0000
+++ ChangeLog 2013-02-08 02:57:22 +0000
@@ -15,6 +15,7 @@
15 collection).15 collection).
1616
17Bug Fixes/Other Changes:17Bug Fixes/Other Changes:
18 * Fixed bug #867027 (XQST0059 error messages inconsistent)
18 * Fixed bug #1095889 (Improve error message for xml-parsing error).19 * Fixed bug #1095889 (Improve error message for xml-parsing error).
19 * NaN items are considered equal to each other during grouping20 * NaN items are considered equal to each other during grouping
20 * Fixed bug #855481 (Too small time types on Windows).21 * Fixed bug #855481 (Too small time types on Windows).
2122
=== modified file 'include/zorba/pregenerated/diagnostic_list.h'
--- include/zorba/pregenerated/diagnostic_list.h 2013-01-23 17:24:44 +0000
+++ include/zorba/pregenerated/diagnostic_list.h 2013-02-08 02:57:22 +0000
@@ -422,6 +422,8 @@
422422
423extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0013_FXCHARHEAP_EXCEPTION;423extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0013_FXCHARHEAP_EXCEPTION;
424424
425extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0014_OUT_OF_MEMORY;
426
425extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0016_RESERVED_MODULE_TARGET_NAMESPACE;427extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0016_RESERVED_MODULE_TARGET_NAMESPACE;
426428
427extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0017_FILE_ACCESS_DISABLED;429extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0017_FILE_ACCESS_DISABLED;
@@ -446,6 +448,10 @@
446448
447extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0032_ERROR_TRANSFORMING_XQUERYX_TO_XQUERY;449extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0032_ERROR_TRANSFORMING_XQUERYX_TO_XQUERY;
448450
451extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0033_SCHEMA_XML_ERROR;
452
453extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0035_SCHEMA_UNEXPECTED_ERROR;
454
449extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0036_BREAKITERATOR_CREATION_FAILED;455extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0036_BREAKITERATOR_CREATION_FAILED;
450456
451extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0037_INAPPROPRIATE_MODULE_VERSION;457extern ZORBA_DLL_PUBLIC ZorbaErrorCode ZXQP0037_INAPPROPRIATE_MODULE_VERSION;
452458
=== modified file 'modules/com/zorba-xquery/www/modules/pregenerated/errors.xq'
--- modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2013-01-08 00:31:47 +0000
+++ modules/com/zorba-xquery/www/modules/pregenerated/errors.xq 2013-02-08 02:57:22 +0000
@@ -113,6 +113,10 @@
113113
114(:~114(:~
115:)115:)
116declare variable $zerr:ZXQP0014 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0014");
117
118(:~
119:)
116declare variable $zerr:ZXQP0016 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0016");120declare variable $zerr:ZXQP0016 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0016");
117121
118(:~122(:~
@@ -161,6 +165,14 @@
161165
162(:~166(:~
163:)167:)
168declare variable $zerr:ZXQP0033 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0033");
169
170(:~
171:)
172declare variable $zerr:ZXQP0035 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0035");
173
174(:~
175:)
164declare variable $zerr:ZXQP0036 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0036");176declare variable $zerr:ZXQP0036 as xs:QName := fn:QName($zerr:NS, "zerr:ZXQP0036");
165177
166(:~178(:~
167179
=== modified file 'modules/w3c/pregenerated/xqt-errors.xq'
--- modules/w3c/pregenerated/xqt-errors.xq 2013-01-19 20:47:55 +0000
+++ modules/w3c/pregenerated/xqt-errors.xq 2013-02-08 02:57:22 +0000
@@ -420,8 +420,8 @@
420420
421(:~421(:~
422 :422 :
423 : It is a static error if a schema import binds a namespace prefix but does423 : It is a static error if a schema import binds a namespace prefix but
424 : not specify a target namespace other than a zero-length string.424 : does not specify a target namespace other than a zero-length string.
425 : 425 :
426 : @see http://www.w3.org/2005/xqt-errors426 : @see http://www.w3.org/2005/xqt-errors
427:)427:)
@@ -439,8 +439,8 @@
439(:~439(:~
440 :440 :
441 : It is a static error if an implementation is unable to process a schema441 : It is a static error if an implementation is unable to process a schema
442 : or module import by finding a schema or module with the specified target442 : or module import by finding a schema or module with the specified
443 : namespace.443 : target namespace.
444 : 444 :
445 : @see http://www.w3.org/2005/xqt-errors445 : @see http://www.w3.org/2005/xqt-errors
446:)446:)
447447
=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp 2013-01-29 06:01:31 +0000
+++ src/compiler/translator/translator.cpp 2013-02-08 02:57:22 +0000
@@ -2197,7 +2197,13 @@
2197 }2197 }
21982198
2199 if ( lStream == NULL ) {2199 if ( lStream == NULL ) {
2200 throw XQUERY_EXCEPTION(err::XQST0059, ERROR_PARAMS(lNsURI, lErrorMessage));2200 throw XQUERY_EXCEPTION(
2201 err::XQST0059,
2202 ERROR_PARAMS(
2203 ZED( XQST0059_SpecificationMessage ),
2204 lNsURI, "", lErrorMessage
2205 )
2206 );
2201 }2207 }
22022208
2203 // If we got this far, we have a valid StreamResource.2209 // If we got this far, we have a valid StreamResource.
@@ -3086,7 +3092,14 @@
3086 if (theModulesInfo->mod_ns_map.get(compURI, importedNS))3092 if (theModulesInfo->mod_ns_map.get(compURI, importedNS))
3087 {3093 {
3088 if (importedNS != targetNS)3094 if (importedNS != targetNS)
3089 RAISE_ERROR(err::XQST0059, loc, ERROR_PARAMS(targetNS, compURI));3095 throw XQUERY_EXCEPTION(
3096 err::XQST0059,
3097 ERROR_PARAMS(
3098 ZED( XQST0059_SpecificationMessage ),
3099 targetNS, compURI
3100 ),
3101 ERROR_LOC( loc )
3102 );
30903103
3091 bool found = theModulesInfo->mod_sctx_map.get(compURI, importedSctx);3104 bool found = theModulesInfo->mod_sctx_map.get(compURI, importedSctx);
3092 ZORBA_ASSERT(found);3105 ZORBA_ASSERT(found);
@@ -3129,7 +3142,14 @@
3129 }3142 }
3130 else3143 else
3131 {3144 {
3132 RAISE_ERROR(err::XQST0059, loc, ERROR_PARAMS(targetNS, compURI, lErrorMessage));3145 throw XQUERY_EXCEPTION(
3146 err::XQST0059,
3147 ERROR_PARAMS(
3148 ZED( XQST0059_SpecificationMessage ),
3149 targetNS, compURI, lErrorMessage
3150 ),
3151 ERROR_LOC( loc )
3152 );
3133 }3153 }
31343154
3135 // Get the parent of the query root sctx. This is the user-specified sctx3155 // Get the parent of the query root sctx. This is the user-specified sctx
@@ -3185,7 +3205,14 @@
3185 // Also make sure that the imported module is a library module3205 // Also make sure that the imported module is a library module
3186 LibraryModule* mod_ast = dynamic_cast<LibraryModule *>(&*ast);3206 LibraryModule* mod_ast = dynamic_cast<LibraryModule *>(&*ast);
3187 if (mod_ast == NULL)3207 if (mod_ast == NULL)
3188 RAISE_ERROR(err::XQST0059, loc, ERROR_PARAMS(targetNS, compURI));3208 throw XQUERY_EXCEPTION(
3209 err::XQST0059,
3210 ERROR_PARAMS(
3211 ZED( XQST0059_SpecificationMessage ),
3212 targetNS, compURI
3213 ),
3214 ERROR_LOC( loc )
3215 );
31893216
3190 importedNS = mod_ast->get_decl()->get_target_namespace().str();3217 importedNS = mod_ast->get_decl()->get_target_namespace().str();
31913218
@@ -3193,7 +3220,14 @@
3193 throw XQUERY_EXCEPTION(err::XQST0088, ERROR_LOC(loc));3220 throw XQUERY_EXCEPTION(err::XQST0088, ERROR_LOC(loc));
31943221
3195 if (importedNS != targetNS)3222 if (importedNS != targetNS)
3196 RAISE_ERROR(err::XQST0059, loc, ERROR_PARAMS(targetNS, compURI));3223 throw XQUERY_EXCEPTION(
3224 err::XQST0059,
3225 ERROR_PARAMS(
3226 ZED( XQST0059_SpecificationMessage ),
3227 targetNS, compURI
3228 ),
3229 ERROR_LOC( loc )
3230 );
31973231
3198 // translate the imported module3232 // translate the imported module
3199 translate_aux(theRootTranslator,3233 translate_aux(theRootTranslator,
32003234
=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml 2013-02-03 19:01:15 +0000
+++ src/diagnostics/diagnostic_en.xml 2013-02-08 02:57:22 +0000
@@ -572,27 +572,33 @@
572572
573 <diagnostic code="XQST0057">573 <diagnostic code="XQST0057">
574 <comment>574 <comment>
575 It is a static error if a schema import binds a namespace prefix but does575 It is a static error if a schema import binds a namespace prefix but
576 not specify a target namespace other than a zero-length string.576 does not specify a target namespace other than a zero-length string.
577 </comment>577 </comment>
578 <value>empty target namespace</value>578 <value>empty target namespace</value>
579 </diagnostic>579 </diagnostic>
580580
581 <diagnostic code="XQST0058">581 <diagnostic code="XQST0058">
582 <comment>582 <comment>
583 It is a static error if multiple schema imports specify the same target583 It is a static error if multiple schema imports specify the same target
584 namespace.584 namespace.
585 </comment>585 </comment>
586 <value>"$1": duplicate target namespace</value>586 <value>"$1": duplicate target namespace</value>
587 </diagnostic>587 </diagnostic>
588588
589 <diagnostic code="XQST0059">589 <diagnostic code="XQST0059">
590 <comment>590 <comment>
591 It is a static error if an implementation is unable to process a schema591 It is a static error if an implementation is unable to process a schema
592 or module import by finding a schema or module with the specified target592 or module import by finding a schema or module with the specified
593 namespace.593 target namespace.
594 </comment>594 </comment>
595 <value>"$1": target namespace not found for schema/module${ 2}</value>595 <value>$1</value>
596 <entry key="SpecificationMessage">
597 <value>"$2": target namespace not found for schema/module${ "3"}${: 4}</value>
598 </entry>
599 <entry key="XercesMessage">
600 <value>$2,$3: error in schema${ with System ID "4"}${ with Public ID "5"}${: 6}</value>
601 </entry>
596 </diagnostic>602 </diagnostic>
597603
598 <diagnostic code="XQST0060">604 <diagnostic code="XQST0060">
@@ -1964,6 +1970,10 @@
1964 <value>FxCharHeap error: $1 ($2)</value>1970 <value>FxCharHeap error: $1 ($2)</value>
1965 </diagnostic>1971 </diagnostic>
19661972
1973 <diagnostic code="ZXQP0014" name="OUT_OF_MEMORY">
1974 <value>${"1": }out of memory${: 2}</value>
1975 </diagnostic>
1976
1967 <diagnostic code="ZXQP0016" name="RESERVED_MODULE_TARGET_NAMESPACE">1977 <diagnostic code="ZXQP0016" name="RESERVED_MODULE_TARGET_NAMESPACE">
1968 <value>"$1": reserved module target namespace</value>1978 <value>"$1": reserved module target namespace</value>
1969 </diagnostic>1979 </diagnostic>
@@ -1986,7 +1996,6 @@
19861996
1987 <diagnostic code="ZXQP0025" name="COULD_NOT_FETCH_RESOURCE">1997 <diagnostic code="ZXQP0025" name="COULD_NOT_FETCH_RESOURCE">
1988 <value>"$1": could not fetch resource${; reason: 2}</value>1998 <value>"$1": could not fetch resource${; reason: 2}</value>
1989
1990 <entry key="RESOURCE_NOT_FOUND">1999 <entry key="RESOURCE_NOT_FOUND">
1991 <value>resource not found</value>2000 <value>resource not found</value>
1992 </entry>2001 </entry>
@@ -2016,6 +2025,14 @@
2016 <value>error transforming XQueryX to XQuery${: 1}</value>2025 <value>error transforming XQueryX to XQuery${: 1}</value>
2017 </diagnostic>2026 </diagnostic>
20182027
2028 <diagnostic code="ZXQP0033" name="SCHEMA_XML_ERROR">
2029 <value>${"1": }XML error in schema${: 2}</value>
2030 </diagnostic>
2031
2032 <diagnostic code="ZXQP0035" name="SCHEMA_UNEXPECTED_ERROR">
2033 <value>${"1": }unexpected error in schema${: 2}</value>
2034 </diagnostic>
2035
2019 <diagnostic code="ZXQP0036" name="BREAKITERATOR_CREATION_FAILED">2036 <diagnostic code="ZXQP0036" name="BREAKITERATOR_CREATION_FAILED">
2020 <value>BreakIterator creation failed</value>2037 <value>BreakIterator creation failed</value>
2021 </diagnostic>2038 </diagnostic>
@@ -2037,9 +2054,7 @@
2037 </diagnostic>2054 </diagnostic>
20382055
2039 <diagnostic code="ZXQP0050" name="FEATURE_NOT_AVAILABLE">2056 <diagnostic code="ZXQP0050" name="FEATURE_NOT_AVAILABLE">
2040
2041 <value>"$1": feature not available</value>2057 <value>"$1": feature not available</value>
2042
2043 </diagnostic>2058 </diagnostic>
20442059
2045 <diagnostic code="ZXQP0060" name="OPTION_NOT_KNOWN">2060 <diagnostic code="ZXQP0060" name="OPTION_NOT_KNOWN">
@@ -3719,14 +3734,6 @@
3719 <value>the standalone attribute has a value other than "omit"</value>3734 <value>the standalone attribute has a value other than "omit"</value>
3720 </entry>3735 </entry>
37213736
3722 <entry key="SchemaOutOfMemory">
3723 <value>OutOfMemoryException during parsing</value>
3724 </entry>
3725
3726 <entry key="SchemaParseError">
3727 <value>error during parsing</value>
3728 </entry>
3729
3730 <entry key="SchemaUnexpected">3737 <entry key="SchemaUnexpected">
3731 <value>unexpected exception during parsing</value>3738 <value>unexpected exception during parsing</value>
3732 </entry>3739 </entry>
37333740
=== modified file 'src/diagnostics/pregenerated/diagnostic_list.cpp'
--- src/diagnostics/pregenerated/diagnostic_list.cpp 2013-01-23 17:24:44 +0000
+++ src/diagnostics/pregenerated/diagnostic_list.cpp 2013-02-08 02:57:22 +0000
@@ -613,6 +613,9 @@
613ZorbaErrorCode ZXQP0013_FXCHARHEAP_EXCEPTION( "ZXQP0013" );613ZorbaErrorCode ZXQP0013_FXCHARHEAP_EXCEPTION( "ZXQP0013" );
614614
615615
616ZorbaErrorCode ZXQP0014_OUT_OF_MEMORY( "ZXQP0014" );
617
618
616ZorbaErrorCode ZXQP0016_RESERVED_MODULE_TARGET_NAMESPACE( "ZXQP0016" );619ZorbaErrorCode ZXQP0016_RESERVED_MODULE_TARGET_NAMESPACE( "ZXQP0016" );
617620
618621
@@ -649,6 +652,12 @@
649ZorbaErrorCode ZXQP0032_ERROR_TRANSFORMING_XQUERYX_TO_XQUERY( "ZXQP0032" );652ZorbaErrorCode ZXQP0032_ERROR_TRANSFORMING_XQUERYX_TO_XQUERY( "ZXQP0032" );
650653
651654
655ZorbaErrorCode ZXQP0033_SCHEMA_XML_ERROR( "ZXQP0033" );
656
657
658ZorbaErrorCode ZXQP0035_SCHEMA_UNEXPECTED_ERROR( "ZXQP0035" );
659
660
652ZorbaErrorCode ZXQP0036_BREAKITERATOR_CREATION_FAILED( "ZXQP0036" );661ZorbaErrorCode ZXQP0036_BREAKITERATOR_CREATION_FAILED( "ZXQP0036" );
653662
654663
655664
=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp 2013-02-03 19:01:15 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp 2013-02-08 02:57:22 +0000
@@ -230,7 +230,7 @@
230 { "XQST0055", "multiple copy-namespaces declarations" },230 { "XQST0055", "multiple copy-namespaces declarations" },
231 { "XQST0057", "empty target namespace" },231 { "XQST0057", "empty target namespace" },
232 { "XQST0058", "\"$1\": duplicate target namespace" },232 { "XQST0058", "\"$1\": duplicate target namespace" },
233 { "XQST0059", "\"$1\": target namespace not found for schema/module${ 2}" },233 { "XQST0059", "$1" },
234 { "XQST0060", "\"$1\": function name has a null namespace URI" },234 { "XQST0060", "\"$1\": function name has a null namespace URI" },
235 { "XQST0065", "multiple ordering mode declaraions" },235 { "XQST0065", "multiple ordering mode declaraions" },
236 { "XQST0066", "multiple element/type/function namespace declarations" },236 { "XQST0066", "multiple element/type/function namespace declarations" },
@@ -498,6 +498,7 @@
498 { "ZXQP0011", "\"$1\": invalid locale" },498 { "ZXQP0011", "\"$1\": invalid locale" },
499 { "ZXQP0012", "\"$1\": unknown locale" },499 { "ZXQP0012", "\"$1\": unknown locale" },
500 { "ZXQP0013", "FxCharHeap error: $1 ($2)" },500 { "ZXQP0013", "FxCharHeap error: $1 ($2)" },
501 { "ZXQP0014", "${\"1\": }out of memory${: 2}" },
501 { "ZXQP0016", "\"$1\": reserved module target namespace" },502 { "ZXQP0016", "\"$1\": reserved module target namespace" },
502 { "ZXQP0017", "file access disabled" },503 { "ZXQP0017", "file access disabled" },
503 { "ZXQP0020", "\"$1\": invalid URI${: 2}" },504 { "ZXQP0020", "\"$1\": invalid URI${: 2}" },
@@ -510,6 +511,8 @@
510 { "ZXQP0030", "deadlock" },511 { "ZXQP0030", "deadlock" },
511 { "ZXQP0031", "malformed XQueryX XML input${: 1}" },512 { "ZXQP0031", "malformed XQueryX XML input${: 1}" },
512 { "ZXQP0032", "error transforming XQueryX to XQuery${: 1}" },513 { "ZXQP0032", "error transforming XQueryX to XQuery${: 1}" },
514 { "ZXQP0033", "${\"1\": }XML error in schema${: 2}" },
515 { "ZXQP0035", "${\"1\": }unexpected error in schema${: 2}" },
513 { "ZXQP0036", "BreakIterator creation failed" },516 { "ZXQP0036", "BreakIterator creation failed" },
514 { "ZXQP0037", "\"$1\": loaded module version \"$2\" does not match import version specification" },517 { "ZXQP0037", "\"$1\": loaded module version \"$2\" does not match import version specification" },
515 { "ZXQP0038", "Query requires Zorba version \"$1\"; you are running Zorba \"$2\"" },518 { "ZXQP0038", "Query requires Zorba version \"$1\"; you are running Zorba \"$2\"" },
@@ -799,8 +802,6 @@
799#endif802#endif
800 { "~SEPM0009_Not10", "the version parameter has a value other than \"1.0\" and the doctype-system parameter is specified" },803 { "~SEPM0009_Not10", "the version parameter has a value other than \"1.0\" and the doctype-system parameter is specified" },
801 { "~SEPM0009_NotOmit", "the standalone attribute has a value other than \"omit\"" },804 { "~SEPM0009_NotOmit", "the standalone attribute has a value other than \"omit\"" },
802 { "~SchemaOutOfMemory", "OutOfMemoryException during parsing" },
803 { "~SchemaParseError", "error during parsing" },
804 { "~SchemaUnexpected", "unexpected exception during parsing" },805 { "~SchemaUnexpected", "unexpected exception during parsing" },
805 { "~SearchKeyTypeMismatch_234", "\"$2\": search key type for index \"$3\" does not match expected type \"$4\"" },806 { "~SearchKeyTypeMismatch_234", "\"$2\": search key type for index \"$3\" does not match expected type \"$4\"" },
806 { "~SearchKeyTypeNoProbeIndex_23", "\"$2\": search key type can not probe index \"$3\"" },807 { "~SearchKeyTypeNoProbeIndex_23", "\"$2\": search key type can not probe index \"$3\"" },
@@ -918,6 +919,8 @@
918 { "~XPTY0117_NodeCast", "Cannot cast node to xs:QName" },919 { "~XPTY0117_NodeCast", "Cannot cast node to xs:QName" },
919 { "~XPTY0117_NotationParam_23", "$2 can not be promoted to parameter type xs:NOTATION of function $3()" },920 { "~XPTY0117_NotationParam_23", "$2 can not be promoted to parameter type xs:NOTATION of function $3()" },
920 { "~XQST0046_BadHexDigit_3", "'$3': invalid hexedecimal digit" },921 { "~XQST0046_BadHexDigit_3", "'$3': invalid hexedecimal digit" },
922 { "~XQST0059_SpecificationMessage", "\"$2\": target namespace not found for schema/module${ \"3\"}${: 4}" },
923 { "~XQST0059_XercesMessage", "$2,$3: error in schema${ with System ID \"4\"}${ with Public ID \"5\"}${: 6}" },
921 { "~XQST0106_CONFLICTING", "conflicting" },924 { "~XQST0106_CONFLICTING", "conflicting" },
922 { "~XQST0106_THE_SAME", "the same" },925 { "~XQST0106_THE_SAME", "the same" },
923 { "~XUDY0021_AttributeName", "\"$3\": attribute with the same name already exists" },926 { "~XUDY0021_AttributeName", "\"$3\": attribute with the same name already exists" },
924927
=== modified file 'src/diagnostics/pregenerated/dict_zed_keys.h'
--- src/diagnostics/pregenerated/dict_zed_keys.h 2013-02-03 19:01:15 +0000
+++ src/diagnostics/pregenerated/dict_zed_keys.h 2013-02-08 02:57:22 +0000
@@ -50,6 +50,8 @@
50#define ZED_XPTY0117_NodeCast "~XPTY0117_NodeCast"50#define ZED_XPTY0117_NodeCast "~XPTY0117_NodeCast"
51#define ZED_XPTY0117_NotationParam_23 "~XPTY0117_NotationParam_23"51#define ZED_XPTY0117_NotationParam_23 "~XPTY0117_NotationParam_23"
52#define ZED_XQST0046_BadHexDigit_3 "~XQST0046_BadHexDigit_3"52#define ZED_XQST0046_BadHexDigit_3 "~XQST0046_BadHexDigit_3"
53#define ZED_XQST0059_SpecificationMessage "~XQST0059_SpecificationMessage"
54#define ZED_XQST0059_XercesMessage "~XQST0059_XercesMessage"
53#define ZED_XQST0106_THE_SAME "~XQST0106_THE_SAME"55#define ZED_XQST0106_THE_SAME "~XQST0106_THE_SAME"
54#define ZED_XQST0106_CONFLICTING "~XQST0106_CONFLICTING"56#define ZED_XQST0106_CONFLICTING "~XQST0106_CONFLICTING"
55#define ZED_XPDY0002_VariableHasNoValue_2 "~XPDY0002_VariableHasNoValue_2"57#define ZED_XPDY0002_VariableHasNoValue_2 "~XPDY0002_VariableHasNoValue_2"
@@ -255,8 +257,6 @@
255#define ZED_QuotedColon_23 "~QuotedColon_23"257#define ZED_QuotedColon_23 "~QuotedColon_23"
256#define ZED_SEPM0009_Not10 "~SEPM0009_Not10"258#define ZED_SEPM0009_Not10 "~SEPM0009_Not10"
257#define ZED_SEPM0009_NotOmit "~SEPM0009_NotOmit"259#define ZED_SEPM0009_NotOmit "~SEPM0009_NotOmit"
258#define ZED_SchemaOutOfMemory "~SchemaOutOfMemory"
259#define ZED_SchemaParseError "~SchemaParseError"
260#define ZED_SchemaUnexpected "~SchemaUnexpected"260#define ZED_SchemaUnexpected "~SchemaUnexpected"
261#define ZED_SearchKeyTypeMismatch_234 "~SearchKeyTypeMismatch_234"261#define ZED_SearchKeyTypeMismatch_234 "~SearchKeyTypeMismatch_234"
262#define ZED_SearchKeyTypeNoProbeIndex_23 "~SearchKeyTypeNoProbeIndex_23"262#define ZED_SearchKeyTypeNoProbeIndex_23 "~SearchKeyTypeNoProbeIndex_23"
263263
=== modified file 'src/types/schema/LoadSchemaErrorHandler.cpp'
--- src/types/schema/LoadSchemaErrorHandler.cpp 2012-09-19 21:16:15 +0000
+++ src/types/schema/LoadSchemaErrorHandler.cpp 2013-02-08 02:57:22 +0000
@@ -50,42 +50,30 @@
50// ---------------------------------------------------------------------------50// ---------------------------------------------------------------------------
51void LoadSchemaErrorHandler::error(const XERCES_CPP_NAMESPACE::SAXParseException& e)51void LoadSchemaErrorHandler::error(const XERCES_CPP_NAMESPACE::SAXParseException& e)
52{52{
53 zstring system_id, public_id;
54 if ( e.getSystemId() )
55 system_id = StrX( e.getSystemId() ).localFormOrDefault( "" );
56 if ( e.getPublicId() )
57 public_id = StrX( e.getPublicId() ).localFormOrDefault( "" );
58
53 theSawErrors = true;59 theSawErrors = true;
54 std::ostringstream os;60 throw XQUERY_EXCEPTION(
55 os << "Error in schema ";61 err::XQST0059,
5662 ERROR_PARAMS(
57if ( e.getSystemId() != NULL )63 ZED( XQST0059_XercesMessage ),
58 os << "with system id " << StrX(e.getSystemId());64 e.getLineNumber(),
59 else if ( e.getPublicId() != NULL )65 e.getColumnNumber(),
60 os << "with public id " << StrX(e.getPublicId());66 system_id,
61 else 67 public_id,
62 os << "without id"; 68 StrX( e.getMessage() ).localFormOrDefault( "" )
63 69 ),
64 os << ", line " << e.getLineNumber() 70 ERROR_LOC( theQueryLoc )
65 << ", column " << e.getColumnNumber() << "." << std::endl71 );
66 << StrX(e.getMessage());
67
68 throw XQUERY_EXCEPTION( err::XQST0059, ERROR_PARAMS(os.str()), ERROR_LOC(theQueryLoc) );
69}72}
7073
71void LoadSchemaErrorHandler::fatalError(const XERCES_CPP_NAMESPACE::SAXParseException& e)74void LoadSchemaErrorHandler::fatalError(const XERCES_CPP_NAMESPACE::SAXParseException& e)
72{75{
73 theSawErrors = true;76 error( e );
74 std::ostringstream os;
75 os << "Fatal error in schema ";
76
77 if ( e.getSystemId() != NULL )
78 os << "with system id " << StrX(e.getSystemId());
79 else if ( e.getPublicId() != NULL )
80 os << "with public id " << StrX(e.getPublicId());
81 else
82 os << "without id";
83
84 os << ", line " << e.getLineNumber()
85 << ", column " << e.getColumnNumber() << "." << std::endl
86 << StrX(e.getMessage());
87
88 throw XQUERY_EXCEPTION( err::XQST0059, ERROR_PARAMS(os.str()), ERROR_LOC(theQueryLoc) );
89}77}
9078
91void LoadSchemaErrorHandler::warning(const XERCES_CPP_NAMESPACE::SAXParseException& e)79void LoadSchemaErrorHandler::warning(const XERCES_CPP_NAMESPACE::SAXParseException& e)
9280
=== modified file 'src/types/schema/schema.cpp'
--- src/types/schema/schema.cpp 2013-01-24 10:49:06 +0000
+++ src/types/schema/schema.cpp 2013-02-08 02:57:22 +0000
@@ -262,8 +262,13 @@
262 else {262 else {
263 // We didn't find it. If we return NULL here, Xerces will try to263 // We didn't find it. If we return NULL here, Xerces will try to
264 // resolve it its own way, which we don't want to happen.264 // resolve it its own way, which we don't want to happen.
265 throw XQUERY_EXCEPTION( err::XQST0059,265 throw XQUERY_EXCEPTION(
266 ERROR_PARAMS( lResolved ));266 err::XQST0059,
267 ERROR_PARAMS(
268 ZED( XQST0059_SpecificationMessage ),
269 lResolved
270 )
271 );
267 }272 }
268 }273 }
269 catch (ZorbaException const& e) {274 catch (ZorbaException const& e) {
@@ -478,25 +483,31 @@
478 }483 }
479 catch (const OutOfMemoryException&)484 catch (const OutOfMemoryException&)
480 {485 {
481 throw XQUERY_EXCEPTION( err::XQST0059,486 throw XQUERY_EXCEPTION(
482 ERROR_PARAMS( std::string(xsdURL), ZED( SchemaOutOfMemory )),487 zerr::ZXQP0014_OUT_OF_MEMORY,
483 ERROR_LOC( loc ) );488 ERROR_PARAMS( xsdURL ),
489 ERROR_LOC( loc )
490 );
484 }491 }
485 catch (const XMLException& e)492 catch (const XMLException& e)
486 {493 {
487 throw XQUERY_EXCEPTION( err::XQST0059,494 throw XQUERY_EXCEPTION(
488 ERROR_PARAMS( std::string(xsdURL), ZED( SchemaParseError ), StrX(e.getMessage())),495 zerr::ZXQP0033_SCHEMA_XML_ERROR,
489 ERROR_LOC( loc ) );496 ERROR_PARAMS( xsdURL, e.getMessage() ),
497 ERROR_LOC( loc )
498 );
490 }499 }
491 catch (const ZorbaException& /* e */)500 catch (const ZorbaException&)
492 {501 {
493 throw;502 throw;
494 }503 }
495 catch (...)504 catch (...)
496 {505 {
497 throw XQUERY_EXCEPTION( err::XQST0059,506 throw XQUERY_EXCEPTION(
498 ERROR_PARAMS( std::string(xsdURL), ZED( SchemaUnexpected )),507 zerr::ZXQP0035_SCHEMA_UNEXPECTED_ERROR,
499 ERROR_LOC( loc ) );508 ERROR_PARAMS( xsdURL ),
509 ERROR_LOC( loc )
510 );
500 }511 }
501512
502#ifdef DO_PRINT_SCHEMA_INFO513#ifdef DO_PRINT_SCHEMA_INFO

Subscribers

People subscribed via source and target branches