Sorry, I've made a mistake.
I registered that M55slik_v0.2.
Just when writing to you I've copied first line and forgot to change CommonTypesSti_v0.2.xsd to M55slik_v0.2.
I've never did XSD validation before. So here is great possibility that I'm doing something wrong.
Someone told me that I need first to create schema based XML before checking if it is valid. Something like this:
l_Xml := l_Xml.createSchemaBasedXML('M55slik_v0.2.xsd');
l_Xml.schemavalidate();
In this case I got error ORA-31000: Resource 'M55slik_v0.2.xsd' is not an XDB schema document
But what is strange that this error is raised not by createSchemaBasedXML('M55slik_v0.2.xsd');
But by schemavalidate();
If I change some letter in name M55slik_v0.2.xsd lets say to M55slik_v0.3.xsd then I get the same ORA-31000 but on l_Xml.createSchemaBasedXML('M55slik_v0.3.xsd');
So it seems that it should be registered("createSchemaBasedXML" did not throw an exception). But "schemavalidate" thinks otherwise and throws ORA-31000. Why?
What it is more strange that if I intentionally made xml not valid then Oracle throws exception about that. So validation is happening. But why I get ORA-31000 when xml seems to be valid?
In one example I found that dbms_xdb.createResource is called.
And after that
Dbms_XmlSchema.RegisterSchema('CommonTypesSti_v0.2.xsd', xdbURIType('/public/M55slik_v0.2.xsd').getClob());
Is this is different from just registering schema directly without dbms_xdb.createResource first?
Can you please tell all necessary steps that should be done to correctly validate xml. I've searched a lot on internet but still can't get it working right.
Thank you