Hi there
Oracle 19c (NLS_CHARACTERSET is Windows-1252)
We have to create xml-files from relational data and then validate it against XSD schemas
Output xml-files must be created in UTF-8 encoding
Xsd schemas are in UTF-8 encoding too
I think there is no problem when both DB and schemas have same encoding
What is the correct way lo load UTF-8 encoded schemas to database (register it with DBMS_XMLSCHEMA.registerSchema)
and then validate created xml-s?
1. When I tried to specify CSIS=>1208 i got error ORA 01482: unsupported character set
declare
v_schema clob;
begin
DBMS_XMLSCHEMA.registerSchema(schemaurl => 'CommonLeafTypes.xsd',
schemadoc => BFILENAME('TEST_DIR', 'CommonLeafTypes.xsd'),
local => TRUE,
gentypes => FALSE,
gentables => FALSE,
enablehierarchy => DBMS_XMLSCHEMA.enable_hierarchy_none,
csid =>1208
);
END;
2. When I tried to NOT specify CSIS i got error ora-31038: invalid integer value "4404019"
during loading the second schema
"
<xs:restriction base="xs:string">
<xs:minLength value="1"/>
<xs:maxLength value="4404019"/>
</xs:restriction>
"
declare
v_schema clob;
begin
DBMS_XMLSCHEMA.registerSchema(schemaurl => 'CommonLeafTypes.xsd',
schemadoc => BFILENAME('TEST_DIR', 'CommonLeafTypes.xsd'),
local => TRUE,
gentypes => FALSE,
gentables => FALSE,
enablehierarchy => DBMS_XMLSCHEMA.enable_hierarchy_none
);
END;