Hi ,
I am trying to Register an XSD for Object Relational Storage in my DB 11.2.0.3. I get the below mentioned error when I try to register the schema. I think I am going wrong somewhere in schema annotations because without them it was registering fine.
I just want the underlying tables created from "element names" to have name annotations as mentioned in "xdb:SQLName" type.
Any assistance would be appreciated - thanks.
BEGIN
DBMS_XMLSCHEMA.REGISTERSCHEMA(
SCHEMAURL=>'http://localhost/public/xsd/ObjectRelXSD.xsd',
SCHEMADOC=>'<?xml version="1.0" encoding="UTF-8"?>
<xs:schema
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:xdb="http://xmlns.oracle.com/xdb">
<xs:element name="purchaseOrder" xdb:SQLName="PURCHASE_ORDER">
<xs:complexType>
<xs:sequence>
<xs:element ref="Ordername"/>
<xs:element ref="Orderid"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="OrderType" xdb:SQLName="ORDER_TYPE">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" ref="Orderdetails"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Orderinstance" type="xs:string" xdb:SQLName="ORDER_INSTANCE"/>
<xs:element name="Orderexpiry" xdb:SQLName="ORDER_EXPIRY">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" ref="Expiryinfo"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Ordervalue" type="xs:string" xdb:SQLName="ORDER_VALUE"/>
<xs:element name="Ordercode" type="xs:string" xdb:SQLName="ORDER_CODE"/>
</xs:schema>
',
LOCAL => TRUE,
GENTYPES => TRUE,
GENTABLES => TRUE);
END;
/
Error:-
Error report -
ORA-31082: invalid attribute "SQLName" specified in declaration of "purchaseOrder"
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 3
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 14
ORA-06512: at line 2
31082. 00000 - "invalid attribute \"%s\" specified in declaration of \"%s\""
*Cause: The XML schema specifies an invalid attribute.
*Action: Remove specification of the invalid attribute.
Message was edited by: 991278