← Back to team overview

zorba-coders team mailing list archive

[Merge] lp:~zorba-coders/zorba/bug-1002993 into lp:zorba

 

Markos Zaharioudakis has proposed merging lp:~zorba-coders/zorba/bug-1002993 into lp:zorba.

Requested reviews:
  Cezar Andrei (cezar-andrei)
  Markos Zaharioudakis (markos-za)

For more details, see:
https://code.launchpad.net/~zorba-coders/zorba/bug-1002993/+merge/108304

Fixed bug #1002993 (bug during revalidation after update due to improper condition for calling TypeOps::get_atomic_type_code() from SchemaValidatorImpl::isPossibleSimpleContentRevalImpl())
-- 
https://code.launchpad.net/~zorba-coders/zorba/bug-1002993/+merge/108304
Your team Zorba Coders is subscribed to branch lp:zorba.
=== modified file 'ChangeLog'
--- ChangeLog	2012-05-30 00:37:00 +0000
+++ ChangeLog	2012-06-01 08:37:21 +0000
@@ -1,5 +1,10 @@
 Zorba - The XQuery Processor
 
+version 2.x
+  * Fixed bug #1002993 (bug during revalidation after update; improper condition for
+          calling TypeOps::get_atomic_type_code() from
+          SchemaValidatorImpl::isPossibleSimpleContentRevalImpl())
+	
 version 2.5
 
 New Features:

=== modified file 'src/types/schema/revalidateUtils.cpp'
--- src/types/schema/revalidateUtils.cpp	2012-05-03 12:31:51 +0000
+++ src/types/schema/revalidateUtils.cpp	2012-06-01 08:37:21 +0000
@@ -579,7 +579,7 @@
 }
   
 bool SchemaValidatorImpl::isPossibleSimpleContentRevalidation(
-    store::Item *typeQName)
+    store::Item* typeQName)
 {
   TypeManager* typeManager = theSctx->get_typemanager();
   
@@ -603,7 +603,7 @@
 {
   if ( schemaType->content_kind() == XQType::SIMPLE_CONTENT_KIND )
   {
-    if (schemaType->is_builtin())
+    if (schemaType->type_kind() == XQType::ATOMIC_TYPE_KIND)
     {
       store::SchemaTypeCode schemaTypeCode = 
           TypeOps::get_atomic_type_code(*schemaType);

=== added file 'test/rbkt/ExpQueryResults/zorba/updates/upd14.xml.res'
--- test/rbkt/ExpQueryResults/zorba/updates/upd14.xml.res	1970-01-01 00:00:00 +0000
+++ test/rbkt/ExpQueryResults/zorba/updates/upd14.xml.res	2012-06-01 08:37:21 +0000
@@ -0,0 +1,2 @@
+<?xml version="1.0" encoding="UTF-8"?>
+ok

=== added file 'test/rbkt/Queries/zorba/updates/forms.xsd'
--- test/rbkt/Queries/zorba/updates/forms.xsd	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/updates/forms.xsd	2012-06-01 08:37:21 +0000
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="utf-8"?>
+<xs:schema targetNamespace="http://www.evaluescience.com/schemas/forms";
+           xmlns = "http://www.evaluescience.com/schemas/forms";
+           xmlns:xs="http://www.w3.org/2001/XMLSchema"; elementFormDefault="qualified">
+
+    <xs:complexType name="Form">
+     <xs:sequence>
+      <xs:any namespace="##targetNamespace" minOccurs="0"
+       maxOccurs="unbounded">
+      </xs:any>
+     </xs:sequence>
+    </xs:complexType>
+
+      <xs:element name="form" type="Form"></xs:element>
+
+    <xs:complexType name="Hidden">
+      <xs:attribute name="name" type="xs:string" use="required"></xs:attribute>
+      <xs:attribute name="value" type="xs:anySimpleType" use="optional" />
+    </xs:complexType>
+
+    <xs:element name="hidden" type="Hidden"></xs:element>
+
+</xs:schema>

=== added file 'test/rbkt/Queries/zorba/updates/upd14.xq'
--- test/rbkt/Queries/zorba/updates/upd14.xq	1970-01-01 00:00:00 +0000
+++ test/rbkt/Queries/zorba/updates/upd14.xq	2012-06-01 08:37:21 +0000
@@ -0,0 +1,19 @@
+import schema namespace f = "http://www.evaluescience.com/schemas/forms"; at "forms.xsd";
+
+declare namespace an = "http://www.zorba-xquery.com/annotations";;
+
+declare %an:no-cache %an:sequential function local:test2() 
+{
+   variable $form := validate strict {
+     <f:form>
+       <f:hidden name="myid" value="3"/>
+     </f:form>
+   };
+
+   replace value of node $form/f:hidden/@value with "hello";
+
+   "ok"
+};
+
+
+local:test2()


Follow ups