Assertion `type.type_kind() == XQType::ATOMIC_TYPE_KIND' failed

Bug #1002993 reported by Matthias Brantner
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
High
Markos Zaharioudakis

Bug Description

The following query and schema cause an assertion to fail.

src/types/typeops.cpp:145: static zorba::store::SchemaTypeCode zorba::TypeOps::get_atomic_type_code(const zorba::XQType&): Assertion `type.type_kind() == XQType::ATOMIC_TYPE_KIND' failed.

-------------- query --------------

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()

-------------- schema --------------

<?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>

Related branches

Changed in zorba:
status: New → In Progress
Changed in zorba:
milestone: none → 2.7
Revision history for this message
Chris Hillery (ceejatec) wrote :

Assigning to Cezar to get review.

Changed in zorba:
assignee: Markos Zaharioudakis (markos-za) → Cezar Andrei (cezar-andrei)
Changed in zorba:
assignee: Cezar Andrei (cezar-andrei) → Markos Zaharioudakis (markos-za)
Changed in zorba:
status: In Progress → Fix Committed
Changed in zorba:
milestone: 2.7 → 2.6
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.