Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/markos-scratch 
into lp:zorba.

Commit message:
Raise XQST0046, if needed, from namespace declaration attribute inside direct 
element constructor

Requested reviews:
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/157767

Raise XQST0046, if needed, from namespace declaration attribute inside direct 
element constructor
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/157767
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2013-04-08 15:07:13 +0000
+++ ChangeLog	2013-04-08 23:01:20 +0000
@@ -55,6 +55,7 @@
   * Fixed bug #1122396 (Associate origin/destination URI to I/O stream)
   * Fixed bug #1111786 (xml/json parse error location in catch clause).
   * Fixed bug #1153800 (construct hexBinary without encoding the data)
+  * Fixed bug #1076402 (bug in CastIterator when target is QName)
   * NaN items are considered equal to each other during grouping
   * Fixed bug #855481 (Too small time types on Windows).
   * Fixed bug #1132032 (Certain regexes involving ^ should be legal)
@@ -74,6 +75,8 @@
     constructor exprs)
   * Fixed bug #1125444 (input group-by exprs were not treated by index-flwor_vars()
     function, leading to erroneous loop hoisting).
+  * Raise XQST0046, if needed, from namespace declaration attribute inside
+    direct element constructor.
   * Fixed bug #1023362 (xsi:type attribute ignored during validation)
 
 

=== modified file 'src/compiler/translator/translator.cpp'
--- src/compiler/translator/translator.cpp	2013-04-08 15:07:13 +0000
+++ src/compiler/translator/translator.cpp	2013-04-08 23:01:20 +0000
@@ -12697,6 +12697,8 @@
         RAISE_ERROR(err::XQST0070, loc, ERROR_PARAMS(uri, ZED(NoBindURI)));
       }
 
+      URI parsedUri(uri);
+
       theSctx->bind_ns(prefix, uri, loc);
       theNSCtx->bind_ns(prefix, uri);
 

=== modified file 'src/diagnostics/diagnostic_en.xml'
--- src/diagnostics/diagnostic_en.xml	2013-04-03 08:39:50 +0000
+++ src/diagnostics/diagnostic_en.xml	2013-04-08 23:01:20 +0000
@@ -4748,6 +4748,10 @@
       <value>XML version expected</value>
     </entry>
 
+    <entry key="libxml_ERR_99"> <!-- XML_ERR_NS_URI -->
+      <value>xmlns$6?{:5}\: URI "$6?6:5": invalid URI</value>
+    </entry>
+
     <entry key="libxml_WAR_97"> <!-- XML_WAR_UNKNOWN_VERSION -->
       <value>"$5": unsupported XML version</value>
     </entry>

=== modified file 'src/diagnostics/pregenerated/dict_en.cpp'
--- src/diagnostics/pregenerated/dict_en.cpp	2013-04-03 08:39:50 +0000
+++ src/diagnostics/pregenerated/dict_en.cpp	2013-04-08 23:01:20 +0000
@@ -1156,6 +1156,7 @@
   { "~libxml_ERR_94", "validation failed: no DTD found" },
   { "~libxml_ERR_95", "\"IGNORE\" or \"INCLUDE\" expected" },
   { "~libxml_ERR_96", "XML version expected" },
+  { "~libxml_ERR_99", "xmlns$6?{:5}\\: URI \"$6?6:5\": invalid URI" },
   { "~libxml_WAR_100", "xmlns$6?{:5}\\: URI \"$6?6:5\": invalid URI" },
   { "~libxml_WAR_102", "\"$5\": invalid value for \"xml:space\"; either \"default\" or \"preserve\" expected" },
   { "~libxml_WAR_106", "\"$5\": avoid attribute ending with ':'" },

=== modified file 'src/diagnostics/pregenerated/dict_zed_keys.h'
--- src/diagnostics/pregenerated/dict_zed_keys.h	2013-04-02 21:46:10 +0000
+++ src/diagnostics/pregenerated/dict_zed_keys.h	2013-04-08 23:01:20 +0000
@@ -454,6 +454,7 @@
 #define ZED_libxml_ERR_94 "~libxml_ERR_94"
 #define ZED_libxml_ERR_95 "~libxml_ERR_95"
 #define ZED_libxml_ERR_96 "~libxml_ERR_96"
+#define ZED_libxml_ERR_99 "~libxml_ERR_99"
 #define ZED_libxml_WAR_97 "~libxml_WAR_97"
 #define ZED_libxml_WAR_98 "~libxml_WAR_98"
 #define ZED_libxml_WAR_99 "~libxml_WAR_99"

=== modified file 'src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp'
--- src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp	2013-03-05 12:34:19 +0000
+++ src/runtime/parsing_and_serializing/parsing_and_serializing_impl.cpp	2013-04-08 23:01:20 +0000
@@ -89,19 +89,19 @@
       loadProps.setStoreDocument(false);
       result = lStore.loadDocument(baseUri, docUri, *is, loadProps);
     }
-    catch ( ZorbaException const &e )
+    catch (const ZorbaException& e)
     {
       XQueryException xe(XQUERY_EXCEPTION(err::FODC0006,
-                                          ERROR_PARAMS("fn:parse-xml()", e.what()),
-                                          ERROR_LOC(loc))
-      );
-      set_data( xe, e );
+      ERROR_PARAMS("fn:parse-xml()", e.what()), ERROR_LOC(loc)));
+
+      set_data(xe, e);
       throw xe;
     }
 
     STACK_PUSH(true, state);
   }
-  STACK_END (state);
+
+  STACK_END(state);
 }
 
 

=== modified file 'src/store/naive/loader_fast.cpp'
--- src/store/naive/loader_fast.cpp	2013-03-11 15:00:50 +0000
+++ src/store/naive/loader_fast.cpp	2013-04-08 23:01:20 +0000
@@ -100,7 +100,7 @@
 /*******************************************************************************
 
 ********************************************************************************/
-void XmlLoader::error(void *ctx, xmlErrorPtr error)
+void XmlLoader::error(void* ctx, xmlErrorPtr error)
 {
   if ( error->level == XML_ERR_NONE )
     return;
@@ -117,8 +117,11 @@
   zstring error_int1_8;
   char const *const error_message_9 = error->message ? error->message : "";
 
-  if ( error->int1 ) {                  // assume valid only if > 0
-    switch ( error->code ) {
+  if ( error->int1 ) 
+  {
+    // assume valid only if > 0
+    switch ( error->code )
+    {
       case XML_ERR_ENTITY_CHAR_ERROR:
       case XML_ERR_INVALID_CHAR:
       case XML_ERR_SEPARATOR_REQUIRED:
@@ -144,7 +147,8 @@
   } // if
 
   XmlLoader *const loader = static_cast<XmlLoader*>( ctx );
-  switch ( error->level ) {
+  switch ( error->level )
+  {
     case XML_ERR_ERROR:
     case XML_ERR_FATAL: {
       XQueryException *const xe = NEW_XQUERY_EXCEPTION(

=== modified file 'test/fots/CMakeLists.txt'
--- test/fots/CMakeLists.txt	2013-04-08 19:49:28 +0000
+++ test/fots/CMakeLists.txt	2013-04-08 23:01:20 +0000
@@ -259,8 +259,6 @@
 EXPECTED_FOTS_FAILURE (fn-unparsed-text-lines fn-unparsed-text-lines-054 0)
 EXPECTED_FOTS_FAILURE (math-acos math-acos-003 0)
 EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes FOAR0001_9 0)
-EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0046_13 0)
-EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0046_14 0)
 EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0085 0)
 EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQST0093a 0)
 EXPECTED_FOTS_FAILURE (misc-CombinedErrorCodes XQTY0086_3 0)

-- 
Mailing list: https://launchpad.net/~zorba-coders
Post to     : zorba-coders@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zorba-coders
More help   : https://help.launchpad.net/ListHelp

Reply via email to