tags:

views:

19

answers:

1

I have registered one XSD in oracle XMLDB. Also I have annotated one element as a CLOB as shown below.

    <xs:element name="data" xdb:SQLType="CLOB">
        <xs:complexType>
           <xs:simpleContent>
              <xs:extension base="xs:string">
                 <xs:anyAttribute processContents="lax"/>
              </xs:extension>
           </xs:simpleContent>
        </xs:complexType>
     </xs:element>

Now when I insert a big doc(305KB) for the same it shows that the insert is successful.

But when it is retrieved by the OCCI client application size of doc retrieved is truncated.

The behaviour is proper for small size document.

May be there is problem in data being inserted. I am not able to find what exactly is wrong.

A: 

I changed the XSD to

  <xs:element name="data" xdb:SQLType="CLOB">
    <xs:simpleType>
     <xs:restriction base="xs:string">
      <xs:maxLength value="31245"></xs:maxLength>
     </xs:restriction>
    </xs:simpleType>
  </xs:element>

Now things seems to be working even if I do not know the root cause why it is so!

Sudhendu Sharma