Hi everyone,

According Bert experience 
(https://www.linkedin.com/groups/Choice-OpenEHR-persistence-layer-144276.S.208531138),
 one must not try to adopt OpenEHR model to relational storage since almost all 
popular database engines able to process native XML.

So I'm experimenting with Oracle XML DB for almost two weeks, and I'm in 
despair and kindly ask you for help.

Here is a Github repository where I've collected few files - 
https://github.com/da-baranov/openehr-ora :
1) EHR.xsd - flattened OpenEHR XML schema
2) regschema.sql - a script that creates an Oracle directory where test files 
should be copied to, registers XML schema and creates a table with 
XML-schema-based column that matches global "version" element
3) composition_1191_0.xml, composition_1322_0.xml and composition_1531_0.xml 
are test instance files which I borrowed from Pablo Pazos github 
(https://github.com/ppazos/cabolabs-emrapp)
4) I'm using Oracle 11.2.0.2.0 Express (for some reasons can't use 12c). The 
key problem is that Oracle rejects all the instance files producing the 
following error:

insert into versions(x) 
values(
  xmltype(
    bfilename('OPENEHR', 'composition_1531_0.xml'),
    NLS_CHARSET_ID('AL32UTF8')
  )
)
-------------
ORA-31079: unable to resolve reference to type "COMPOSITION"
-------------

5) In other cases I faced same error also related to abstract XML type 
resolution with xsi:type: "ORA-31079: unable to resolve reference to type 
"xsd:string"". Although all XML schema namespaces were OK and Visual Studio 
schema validator gives no errors.

Where am I wrong?


-- 
Regards, Dmitry

Reply via email to