Numeric element validation errors using schemas

I’m trying to validate an XML element to be numeric XXXX.XXXX.

I have the following element defined in my XSD

<xs:element name=“FILM_WIDTH”>
xs:annotation
xs:documentationRequired, film width</xs:documentation>
</xs:annotation>
xs:simpleType
<xs:restriction base=“xs:decimal”>
<xs:totalDigits value=“8”/>
<xs:fractionDigits value=“4”/>
</xs:restriction>
</xs:simpleType>
</xs:element>

I created a schema object in Developer importing the above XSD, and it correctly detected the totalDigits 8 fractionDigits 4 constraints (i.e. I can see them in developer).

In TN, I set the document type to validate the record using the schema above.

However, the only value which passes validation in that field is a 2 digit number. As soon as I use a 3 digit number or larger, and even include a decimal, TN gives me a validation error saying:

/E_PURCHASE_ORDER/FILM_WIDTH: [B2BCORE.0082.9489] Number of digits is greater than totalDigits

But the # of digits in the XML is NOT greater than the total digits!

I have the same problem with an integer field as well:

<xs:element name=“DELIVERY_MASS”>
xs:annotation
xs:documentationRequired, delivery mass</xs:documentation>
</xs:annotation>
xs:simpleType
<xs:restriction base=“xs:integer”>
<xs:totalDigits value=“10”/>
</xs:restriction>
</xs:simpleType>
</xs:element>

2 digits passed, 3 or more digits fails validation, but the max is 10!!

The 2 problems must be related.

Any ideas or suggestions are appreciated.