Hi,
first let me show you what my problem is. I have an XSD schema where an element is declared like this:
<xsd:element name = "TestElement">
<xsd:simpleType>
<xsd:restriction base = "xsd:decimal">
<xsd:totalDigits value = "11"/>
<xsd:fractionDigits value = "3"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
When I register the XSD schema, and use genType = true with registerSchema procedure, it creates an element, that is of type
number(11,3).
I know that this is documented to be correct (http://download.oracle.com/docs/cd/B10500_01/appdev.920/a96620/xdb05obj.htm) and Oracle uses totalDigits *(m)* and fractionDigits*(n)* to create NUMBER *(m,n)*.
But is this really correct? If, in the above example, i have a number 12345678911 the number is correct in the XML data, when validating against such schema. But in Oracle it isnt, because the "m" number is actually "m-n" so the maximum length is 8 numbers before the fraction digits.
Does anybody else have this kind of a problem. I am not sure if this is a bug or not, but just wondering if nobody else has problems with this.
We now usually make changes to the XSD schema and just correct the totalDigits value, like this:
<xsd:element name = "TestElement">
<xsd:simpleType>
<xsd:restriction base = "xsd:decimal">
<xsd:totalDigits value = "*14*"/>
<xsd:fractionDigits value = "3"/>
</xsd:restriction>
</xsd:simpleType>
</xsd:element>
Bug or no bug?
Edited by: Romci on 3.5.2011 5:37