开发者

Oracle XML DB Annotations

I have registered one XSD in ora开发者_如何学JAVAcle 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 (305 KB) 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 behavior is proper for small size document.

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


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!

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜