Skip to Main Content

Database Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Schema registration.

Simon GaddApr 8 2009 — edited May 12 2009
Hi Folks.

I know there are a lot of posts about schema registration. I have read them all but can't find the answer I am looking for so I wonder if you can help me with this issue.

I am trying to register schemas that I have not generated. They come from a third party. These will be used to validate and shred xml documents provided by third parties.

I have tried using the following syntax to register the schema and received the errors displayed
BEGIN
  DBMS_XMLSCHEMA.registerSchema(
  'http://localhost:8080/public/xml/schemas/tadig-gen-2.2.xsd',
  XDBURIType('/public/xml/schemas/tadig-gen-2.2.xsd').getClob(),
  TRUE,
  TRUE,
  FALSE,
  TRUE);
END;

ERROR at line 1:
ORA-31000: Resource 'tadig-gen-2.2.xsd' is not an XDB schema document
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 20
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 31
ORA-06512: at line 2
A few questions arising.

1. The xsd document has an
import
element in the header. This refers to an https URL. If you navigate to this url nothing is returned. Is that an issue?

2. The xml documents I will be loading refer to the namespace which is https does this mean that when i register the xsd document that I should register it with the https URL of the xsd originator? If I try and do this I get the following result.
BEGIN
  DBMS_XMLSCHEMA.registerSchema(
  'https://infocentre.gsm.org/TADIG-GEN/tadig-gen-2.2.xsd',
  XDBURIType('/public/xml/schemas/tadig-gen-2.2.xsd').getClob(),
  TRUE,
  TRUE,
  FALSE,
  TRUE);
END;

ERROR at line 1:
ORA-31154: invalid XML document
ORA-19202: Error occurred in XML processing
LPX-00202: could not open "https://infocentre.gsm.org/TADIG-GEN/tadig-gen-2.2.xsd" (error 2)
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 20
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 31
ORA-06512: at line 2
Any advice/comments or suggestions gratefully received.

Many thanks

Kind regards

Simon Gadd
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0
This post has been answered by mdrake-Oracle on Apr 29 2009
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 9 2009
Added on Apr 8 2009
9 comments
2,597 views