XML SchemaValidate Fails with LSX-00290: Invalid Enumeration Choice "grün"
(Doc ID 1930727.1)
Last updated on MARCH 28, 2019
Applies to:
Oracle Database - Enterprise Edition - Version 11.2.0.4 to 12.1.0.1 [Release 11.2 to 12.1]Oracle Database Cloud Schema Service - Version N/A and later
Oracle Database Exadata Cloud Machine - Version N/A and later
Oracle Cloud Infrastructure - Database Service - Version N/A and later
Oracle Database Backup Service - Version N/A and later
Information in this document applies to any platform.
Symptoms
The database has a non utf8 character set such as WE8MSWIN1252.
Following XML schema
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="person">
<xs:annotation>
<xs:documentation>Comment describing your root element</xs:documentation>
</xs:annotation>
<xs:complexType>
<xs:sequence>
<xs:element name="name">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="10"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
<xs:element name="lieblingsfarbe">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="4"/>
<xs:enumeration value="rot"/>
<xs:enumeration value="grün"/>
<xs:enumeration value="gelb"/>
<xs:enumeration value="blau"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
is registered with
dbms_xmlschema.registerschema(schemaurl => vschema,
schemadoc => bfilename(vpath, vschema),
local => true,
gentypes => false,
genbean => false,
gentables => TRUE,
force => TRUE,
csid => nls_charset_id('AL32UTF8'),
enablehierarchy => DBMS_XMLSCHEMA.ENABLE_HIERARCHY_CONTENTS,
options => dbms_xmlschema.register_binaryxml);
When validating a document containing diacritics, e.g.
'<person><name>Schulze</name><lieblingsfarbe>grün</lieblingsfarbe></person>'
with vxml.createSchemaBasedXML, it raises:
ORA-31038: Invalid enumeration value: "grün"
in 11.2.0.3/ 11.2.0.4 and 11.2.0.1, while the error is
LSX-00290: invalid enumeration choice "grün"
in 11.2.0.4 + PSU 11.2.0.4.2.
Cause
To view full details, sign in with your My Oracle Support account. |
|
Don't have a My Oracle Support account? Click to get started! |
In this Document
Symptoms |
Cause |
Solution |
References |