ORA-30951 Hell [message #180018] |
Thu, 29 June 2006 17:39 |
CrimsonBane
Messages: 3 Registered: June 2006
|
Junior Member |
|
|
I am somewhat new to oracle and I am having a very hard time registering a large XML schema (approx 1MB). I tried the following code but I do not understand where or what the problem is. Is it with the XML schema? If so how do I find the line that it is on.
SQL>
SQL> DECLARE
2
3 -- OS file whose content needs to be read.
4 fileName VARCHAR2(50) := 'test.xsd';
5
6
7 -- Directory Object specifying the file location.
8 directoryName VARCHAR2(50) := 'SOURCE_DIR';
9
10 -- CLOB Object to hold the content of the file from the user specified di
rectory.
11 fileContent CLOB;
12
13
14 BEGIN
15 fileContent := xdb_utilities.getFileContent(fileName, directoryName);
16 dbms_xmlschema.registerSchema('test12', fileContent);
17 END;
18 /
DECLARE
*
ERROR at line 1:
ORA-30951: Element or attribute at Xpath /schema/simpleType[149]/annotation/appi
nfo[2][@] exceeds maximum length
ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 20
ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 31
ORA-06512: at line 16
Thanks,
Crim
|
|
|
|
|
|
Re: ORA-30951 Hell [message #180179 is a reply to message #180173] |
Fri, 30 June 2006 08:53 |
JRowbottom
Messages: 5933 Registered: June 2006 Location: Sunny North Yorkshire, ho...
|
Senior Member |
|
|
Mate,
Which part of
Quote: | 'Or at least the part of the XSD specified by that XPATH '
|
did you miss!
Anyway; enough with the griping.
I strongly suspect that the problem is this:
Your schema defines a simple type "SecurityType_enum_t"
The second /appinfo element under /annotation for this type has a lot of elements /EnumDoc.
Eg
<x:EnumDoc value="EUSUPRA" desc="EuroSupranationalCoupons" />
<x:EnumDoc value="FAC" desc="FederalAgencyCoupon" />
<x:EnumDoc value="FADN" desc="FederalAgencyDiscountNote" />
Now, everywhere else in this schema, the "value" attribute of the EnumDoc element is a single chr, looking like an index (values 0-9, then A-Z, then a-z) and these are all much longer than that.
Also, This type has an annotation/documentation element which is 4042 chrs long, and the maximum length for a string type is 4000.
2)
Hope this helps.
|
|
|
Re: ORA-30951 Hell [message #180187 is a reply to message #180179] |
Fri, 30 June 2006 09:35 |
CrimsonBane
Messages: 3 Registered: June 2006
|
Junior Member |
|
|
Hey thanks big time for the help. It looks like your suggestions were correct. Quick question though how did you so quickly go to the 149th SimpleType or debug it that quickly?
Thanks again,
Crim
|
|
|
|
|