DB2 - Problem description
Problem IC62210 | Status: Closed |
SQL16196N when validating XML document with an anonymous complex type | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
Validation of an XML document fails with SQL16196N when an element has an anonymous complex type that is an extension of a complex type in a different namespace. Suppose the following two schema files are registered in DB2. Validation of documents against these schemas will fail with SQL16196N because element "Alert" contains an anonynous complex type that extends complex type "gargamelType" in namespace "g". 1. smerf.xsd: <?xml version="1.0" encoding="UTF-8"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:g="http://gargamel" targetNamespace="http://smerf" elementFormDefault="qualified"> <import namespace="http://gargamel" schemaLocation="gargamel.xsd" /> <element name="Alert" > <complexType> <complexContent> <extension base="g:gargamelType" /> </complexContent> </complexType> </element> </schema> 2.gargamel.xsd : <?xml version="1.0" encoding="UTF-8"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://gargamel" elementFormDefault="qualified" > <xsd:complexType name="gargamelType"> <xsd:sequence> <xsd:element name="Data"> <xsd:complexType> <!-- anonymous --> <xsd:sequence> <xsd:element name="Object" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> </xsd:schema> | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * Validation of an XML document fails with SQL16196N when an * * element has an anonymous complex type that is an extension * * of a complex type in a different namespace. * **************************************************************** * RECOMMENDATION: * * Problem was first fixed in Version 9.7 Fix Pack 1 * **************************************************************** | |
Local Fix: | |
Point to the base type directly to successfully validate the document. In smerf.xsd, define element "Alert" as follows: <element name="Alert" type="g:gargamelType"/> | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows | |
Solution | |
An element that has an anonymous complex type that references a complex type extension in another namespace will not cause validation to fail. | |
Workaround | |
not known / see Local fix | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 24.07.2009 04.01.2010 04.01.2010 |
Problem solved at the following versions (IBM BugInfos) | |
9.7.FP1 | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.1 |