DB2 - Problem description
Problem IC61710 | Status: Closed |
SCHEMA REGISTRATION FAILS WITH SQL16157N WHEN XML SCHEMA INVOLVES ANY COMPARISON BETWEEN 0,0.0 OR -0.0 | |
product: | |
DB2 FOR LUW / DB2FORLUW / 970 - DB2 | |
Problem description: | |
When a XML schema contains boundary facets that have different representations of the number zero, DB2 schema registration fails with SQL16157N. When an XML instance is validated againsta schema which requires comparison between 0, 0.0 or -0.0, validation fails with SQL16210N. Example 1: the following schema will fail to register because the facets minInclusive and minExclusive have three different representations for the value zero (0, 0.0 and -0.0). --schema <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:simpleType name="baseType"> <xs:restriction base="xs:decimal"> <xs:minInclusive value="0.0" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="restrictedTypeGTZero"> <xs:restriction base="baseType"> <xs:minExclusive value="0" /> </xs:restriction> </xs:simpleType> <xs:simpleType name="restrictedTypeGTNegativeFractionalZero"> <xs:restriction base="baseType"> <xs:minExclusive value="-0.0" /> </xs:restriction> </xs:simpleType> <xs:element name="decimalGreaterThanZero" type="restrictedTypeGTZero" /> <xs:element name="decimalGreaterThanNegativeFractionalZero" type="restrictedTypeGTNegativeFractionalZero" /> </xs:schema> Example 2: the following XML instance will fail to validate against the following schema because the XML instance represents the number zero differently than the schema (0 vs 0.0). --xml instance <decimalGreaterThanOrEquealFractionalZero>0</decimalGreaterThanO rEquealFractionalZero> --schema <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:simpleType name="baseType"> <xs:restriction base="xs:decimal"> <xs:minInclusive value="0.0" /> </xs:restriction> </xs:simpleType> <xs:element name="decimalGreaterThanOrEquealFractionalZero" type="baseType" /> </xs:schema> | |
Problem Summary: | |
**************************************************************** * USERS AFFECTED: * * ALL * **************************************************************** * PROBLEM DESCRIPTION: * * When a XML schema involves any comparison between 0, 0.0 or * * -0.0 in a decimal type restriction, DB2 schema registration * * fails with SQL16157N. * * When validating a XML instance, any comparison between 0, * * 0.0 and -0.0 will cause validation to fail with SQL16210N. * **************************************************************** * RECOMMENDATION: * **************************************************************** | |
Local Fix: | |
To avoid any comparison between 0, 0.0 and -0.0, consistently use only one representation of the number zero (0, 0.0 or -0.0) in the XML schemas and XML instances. | |
available fix packs: | |
DB2 Version 9.7 Fix Pack 1 for Linux, UNIX, and Windows | |
Solution | |
XML schemas that contain facets MININCLUSIVE, MAXINCLUSIVE, MINEXCLUSIVE or MAXEXCLUSIVE set to 0, 0.0 or -0.0 can now be registered and used for validation. | |
Workaround | |
not known / see Local fix | |
Comment | |
First fixed in DB2 V9.5 Fix Pack 5. | |
BUG-Tracking | |
forerunner : APAR is sysrouted TO one or more of the following: IC61734 follow-up : | |
Timestamps | |
Date - problem reported : Date - problem closed : Date - last modified : | 24.06.2009 25.02.2010 25.02.2010 |
Problem solved at the following versions (IBM BugInfos) | |
Problem solved according to the fixlist(s) of the following version(s) | |
9.7.0.1 |