SQL> /* DOC> DOC> The URL here is simply a name that uniquely identifies the registered XML schema DOC> within the database and need not be the physical URL at the which the XML schema DOC> document is located. DOC> DOC> dbms_xmlschema.registerSchema(schemaURL,......) DOC> schemaURL is the URL that uniquely identifies the schema document. DOC> This value is used to derive the path name of the schema document within the DOC> XDB hierarchy. DOC> DOC>*/ SQL> SQL> exec dbms_xmlschema.deleteschema('http://www.w3.org/2001/XMLSchema', dbms_xmlschema.delete_cascade_force); PL/SQL procedure successfully completed. SQL> exec dbms_xmlschema.deleteschema('c:/xml_test/xml.xsd', dbms_xmlschema.delete_cascade_force); PL/SQL procedure successfully completed. SQL> SQL> -- Can not use back slash SQL> declare 2 doc varchar2(1000) := ' 3 7 '; 8 begin 9 dbms_xmlschema.registerSchema('c:\xml_test\xml.xsd', doc); 10 end; 11 / declare * ERROR at line 1: ORA-31020: The operation is not allowed, Reason: invalid characters in path name ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0 ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 12 ORA-06512: at line 9 SQL> SQL> -- Does not like this either SQL> declare 2 doc varchar2(1000) := ' 3 7 '; 8 begin 9 dbms_xmlschema.registerSchema('c:\\xml_test\\xml.xsd', doc); 10 end; 11 / declare * ERROR at line 1: ORA-31020: The operation is not allowed, Reason: invalid characters in path name ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0 ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 12 ORA-06512: at line 9 SQL> SQL> declare 2 doc varchar2(1000) := ' 3 7 '; 8 begin 9 dbms_xmlschema.registerSchema('c:/xml_test/xml.xsd', doc); 10 end; 11 / PL/SQL procedure successfully completed. SQL> select * from resource_view where any_path like '%xml_test%'; RES -------------------------------------------------------------------------------- ANY_PATH -------------------------------------------------------------------------------- 2003-08-18T16:44:12.835000000 2003-08-18T16:44:12.835000000 xml_test us english utf-8 text/plain 1 /sys/schemas/JYANG/c:/xml_test 2003-08-21T09:06:06.552000000 2003-08-21T09:06:06.552000000 xml.xsd us english utf-8 text/xml 1 /sys/schemas/JYANG/c:/xml_test/xml.xsd SQL> select * from path_view where path like '%xml_test%'; PATH -------------------------------------------------------------------------------- RES -------------------------------------------------------------------------------- LINK -------------------------------------------------------------------------------- /sys/schemas/JYANG/c:/xml_test 2003-08-18T16:44:12.835000000 2003-08-18T16:44:12.835000000 xml_test us english utf-8 text/plain 1 c: xml_test xml_test AAAABA== 2HQXMbJuRoqrSU2wKv03rA== kLdTUskxQ+WZVzIeABT5TA== /sys/schemas/JYANG/c:/xml_test/xml.xsd 2003-08-21T09:06:06.552000000 2003-08-21T09:06:06.552000000 xml.xsd us english utf-8 text/xml 1 xml_test xml.xsd xml.xsd AAAAAA== kLdTUskxQ+WZVzIeABT5TA== eDfOB+vBRom9j2eDhetJPg== SQL> select SCHEMA_URL from user_xml_schemas; SCHEMA_URL -------------------------------------------------------------------------------- http://www.example.com/schemas/ipo.xsd c:/xml_test/xml.xsd SQL> exec dbms_xmlschema.deleteschema('c:/xml_test/xml.xsd', dbms_xmlschema.delete_cascade_force); PL/SQL procedure successfully completed. SQL> SQL> begin 2 dbms_xmlschema.registerschema('test3/xml.xsd', ' 3 5 6 7 8 9 10 11 12 13 14 '); 15 end; 16 / PL/SQL procedure successfully completed. SQL> -- 2 resources created: the test3 folder and the schema file SQL> select path from path_view where path like '%test3%'; PATH -------------------------------------------------------------------------------- /sys/schemas/JYANG/test3 /sys/schemas/JYANG/test3/xml.xsd SQL> exec dbms_xmlschema.deleteschema('test3/xml.xsd', dbms_xmlschema.delete_cascade_force); PL/SQL procedure successfully completed. SQL> -- Delete the schema will not remove the folder that was created SQL> select path from path_view where path like '%test3%'; PATH -------------------------------------------------------------------------------- /sys/schemas/JYANG/test3 SQL> call dbms_xdb.deleteresource('/sys/schemas/JYANG/test3'); Call completed. SQL> select path from path_view where path like '%test3%'; no rows selected SQL> SQL> begin 2 dbms_xmlschema.registerschema('test3', ' 3 5 6 7 8 9 10 11 12 13 14 '); 15 end; 16 / PL/SQL procedure successfully completed. SQL> select * from path_view where path like '%test3%'; PATH -------------------------------------------------------------------------------- RES -------------------------------------------------------------------------------- LINK -------------------------------------------------------------------------------- /sys/schemas/JYANG/test3 2003-08-21T09:06:10.943000000 2003-08-21T09:06:10.943000000 test3 us english utf-8 text/xml 1 JYANG test3 test3 AAAAAA== QDl6pypjQIm2yRWtBoxEXg== ZMrzUm9XT/S0UL4LkNfR8Q== SQL> select SCHEMA_URL from user_xml_schemas; SCHEMA_URL -------------------------------------------------------------------------------- http://www.example.com/schemas/ipo.xsd test3 SQL> exec dbms_xmlschema.deleteschema('test3', dbms_xmlschema.delete_cascade_force); PL/SQL procedure successfully completed. SQL> SQL> SQL> declare 2 doc varchar2(1000) := ' 3 7 '; 8 begin 9 dbms_xmlschema.registerSchema('http://www.w3.org/2001/XMLSchema',doc); 10 end; 11 / PL/SQL procedure successfully completed. SQL> select * from resource_view where any_path like '%XMLSchema%'; RES -------------------------------------------------------------------------------- ANY_PATH -------------------------------------------------------------------------------- 2003-08-21T09:06:12.239000000 2003-08-21T09:06:12.239000000 XMLSchema us english utf-8 text/xml 1 /sys/schemas/JYANG/www.w3.org/2001/XMLSchema SQL> select * from path_view where path like '%XMLSchema%'; PATH -------------------------------------------------------------------------------- RES -------------------------------------------------------------------------------- LINK -------------------------------------------------------------------------------- /sys/schemas/JYANG/www.w3.org/2001/XMLSchema 2003-08-21T09:06:12.239000000 2003-08-21T09:06:12.239000000 XMLSchema us english utf-8 text/xml 1 2001 XMLSchema XMLSchema AAAAAA== oTp5nQ6wRd2u0rZ03J4qTg== aaCXAGUnTU6Vs6UFlSRpiQ== SQL> exec dbms_xmlschema.deleteschema('http://www.w3.org/2001/XMLSchema', dbms_xmlschema.delete_cascade_force); PL/SQL procedure successfully completed. SQL> spool off