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

Commit message:
Fixed bug in the throwing of error XQTY0086 during node construction

Requested reviews:
  Markos Zaharioudakis (markos-za)

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

Fixed bug in the throwing of error XQTY0086 during node construction
-- 
https://code.launchpad.net/~zorba-coders/zorba/markos-scratch/+merge/150955
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2013-02-27 13:13:26 +0000
+++ ChangeLog	2013-02-28 05:42:23 +0000
@@ -24,6 +24,7 @@
   * Fixed bug #1124273 (xqdoc crash because of annotation literals)
   * Fixed bug #867027 (XQST0059 error messages inconsistent)
   * Fixed bug #1095889 (Improve error message for xml-parsing error).
+  * Fixed bug in the throwing of error XQTY0086 during node construction.
   * Fixed bug #1122396 (Associate origin/destination URI to I/O stream)
   * Fixed bug #1111786 (xml/json parse error location in catch clause).
   * NaN items are considered equal to each other during grouping

=== modified file 'src/store/naive/node_items.cpp'
--- src/store/naive/node_items.cpp	2013-02-18 14:54:25 +0000
+++ src/store/naive/node_items.cpp	2013-02-28 05:42:23 +0000
@@ -3872,22 +3872,27 @@
   XmlTree* tree = NULL;
   AttributeNode* copyNode = NULL;
   store::Item_t nodeName = theName;
-  store::Item_t typeName;
+  store::Item_t typeName = getType();
   store::Item_t typedValue;
 
   bool isListValue;
 
+  if (parent == rootParent &&
+      typeName != NULL &&
+      (typeName->equals(GET_STORE().theSchemaTypeNames[store::XS_QNAME]) ||
+       typeName->equals(GET_STORE().theSchemaTypeNames[store::XS_NOTATION])))
+  {
+    throw XQUERY_EXCEPTION(err::XQTY0086);
+  }
+
   if (copymode.theTypePreserve)
   {
-    typeName = getType();
     typedValue = theTypedValue;
-
     isListValue = haveListValue();
   }
   else
   {
     isListValue = false;
-
     typeName = NULL;
 
     if (!haveListValue() &&

=== modified file 'test/fots/CMakeLists.txt'
--- test/fots/CMakeLists.txt	2013-02-27 11:48:55 +0000
+++ test/fots/CMakeLists.txt	2013-02-28 05:42:23 +0000
@@ -687,8 +687,6 @@
 EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-charref-2 1130998)
 EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-nsmode-5 0)
 EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-nsmode-6 0)
-EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-nsmode-7 0)
-EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-nsmode-8 0)
 EXPECTED_FOTS_FAILURE (prod-DirElemContent Constr-cont-nsmode-10 0)
 EXPECTED_FOTS_FAILURE (prod-DirElemContent.namespace K2-DirectConElemNamespace-40 0)
 EXPECTED_FOTS_FAILURE (prod-DirElemContent.namespace K2-DirectConElemNamespace-56 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