Hi there,
unfortunately I'm a newbie to XDB and maybe this is a basic question. But I didn't get it solved right now (also Google wasn't my friend helping me out)...
I try to register a set of xsd to XML DB (11g Release 2 11.2.0.1.0) with the given structure:
Folder 'demo' contains:
mainmodel.xsd
types.xsd
Subfolder 'demo/details' contains:
submodel_a.xsd with <xs:include schemaLocation="../types.xsd"/>
submodel_b.xsd with <xs:include schemaLocation="submodel_a.xsd"/>
First I created the folders 'demo' and 'demo/details' in the XML DB repository using dbms_xdb.CreateFolder.
Then I added the xsd as resources to the XML DB, e.g.
declare
v_result boolean;
v_schema xmltype := xmltype(bfilename('DEMO', 'types.xsd'), nls_charset_id('ISO-8859-1'));
begin
v_result := dbms_xdb.CreateResource('/demo/types.xsd', v_schema);
end;
/
Then I registered my types.xsd:
begin
DBMS_XMLSCHEMA.REGISTERSCHEMA(
schemaurl => 'types.xsd',
schemadoc => BFILENAME ('DEMO','types.xsd'),
csid => 0
);
end;
/
When trying to register submodel_a.xsd the same way I get the following error:
ORA-31000: Ressource '../types.xsd' is not an XDB schema document.
How can I resolve this?
Best regards
Matthias