XML Datastore with default precision length
AbhishekMar 20 2012 — edited Mar 20 2012Hi All,
While creating a xml datastore in model by using xsd, it creates columns with default column length/precision. I need them to be exact to target db.
Here is the sample xsd with columns restriction...
<xsd:element name="NAME" minOccurs="1" xdb:SQLName="NAME"
xdb:SQLTYPE="VARCHAR2">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="960"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="DESCRIPTION" minOccurs="0" xdb:SQLName="DESCRIPTION"
xdb:SQLTYPE="VARCHAR2">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="4000"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="STAT_CD" minOccurs="1" xdb:SQLName="STAT_CD"
xdb:SQLTYPE="VARCHAR2">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="120"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="PROFILE_TYPE" minOccurs="0" xdb:SQLName="PROFILE_TYPE"
xdb:SQLTYPE="VARCHAR2">
<xsd:simpleType>
<xsd:restriction base="xsd:string">
<xsd:maxLength value="60"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
<xsd:element name="REGN_ID" minOccurs="0" xdb:SQLName="REGN_ID"
xdb:SQLTYPE="NUMBER">
<xsd:simpleType>
<xsd:restriction base="xsd:integer">
<xsd:precision value="18"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
Here simpletype defines the length/precision or the element.
While creating datastore by reverse engg it takes the dedault length which is 10 for numeric and 255 for varchar.
Is this xsd is wrong or something else.