I am on 184.108.40.206.0 - 64bit Production.
I have deleted a schema using DBMS_XMLSCHEMA.DELETESSCHEMA and delete_option 3.
I have then also deleted the resource using DBMS_XDB.DELETERESOURCE.
I then execute the XMLTYPE schemaValidate method on a record that was based on the schema just deleted and the result is an error that could only occur if the schema as still there (being more than one occurrence of an element that must have only one occurrence).
What am I missing?
Context: This is a development database and I am trying to replace an incorrect schema without having to spend a lot of time (slow performing system) migrating data using that schema.
OK. I have formulated a hypothesis while trying to get together a test case for this forum and Oracle support.
Originally I replaced the XSD only as a resource using the DBMS_XDB.DELETERESOURCE method. Life went on and eventually testing hit an error that lead me to believe I should have done something more.
I then discovered the DBMS_XMLSCHEMA.DELETESSCHEMA method and tried to use that in conjunction with the DBMS_XDB.DELETERESOURCE method. It was after this, when I could see the schema said one thing but the XMLTYPE schemaValidate method said something different, that I started this discussion and raised an Oracle Support call.
Since then, I have been restoring the DB and repeating tests in order to produce a test case, but everything has then been working as expected.
Hypothesis: Removing the XSD originally using only the DBMS_XDB.DELETERESOURCE method left the system in some sort of inconsistent state that the subsequent use of the DBMS_XMLSCHEMA.DELETESSCHEMA method could not correct.
Thanks to anyone who spent some time giving this some consideration.