The element <mappedDatatype> has a number of attributes, including minInclusive and maxInclusive to specify a lower and/or upper bound for numeric values. The ISO 20022 logical model has both of these attributes but also totalDigits and fractionDigits to define the total number of digits and the maximum number of digits after the decimal point (for ASCII encodings like XML). These two attributes are specific to XML and there is no XML attribute to define a minimal precision. The latter requires the use of a pattern, e.g. <xs:pattern value="-?\d+\.\d{2}"/> to require exactly two decimal places. Note that in XML, the fractionDigits facet constrains the value space of xs:decimal, not its lexical representation. For example, 1.23 and 1.23000 are both valid when fractionDigits="2".
Whilst totalDigits can be mapped to maxInclusive (unless maxInclusive is explicitly provided), the maximum precision of a decimal number does not have an equivalent Orchestra attribute. The precision is quite common information and sometimes even part of a logical data element, e.g. AvgPxPrecision(74) and PricePrecision(2349) in FIX. It seems more efficient to have an attribute for fields and datatype mappings.
It is proposed to add two optional attributes minPrecision and maxPrecision to define the minimum/maximum number of "meaningful" decimal places.
The element
<mappedDatatype>has a number of attributes, includingminInclusiveandmaxInclusiveto specify a lower and/or upper bound for numeric values. The ISO 20022 logical model has both of these attributes but alsototalDigitsandfractionDigitsto define the total number of digits and the maximum number of digits after the decimal point (for ASCII encodings like XML). These two attributes are specific to XML and there is no XML attribute to define a minimal precision. The latter requires the use of a pattern, e.g.<xs:pattern value="-?\d+\.\d{2}"/>to require exactly two decimal places. Note that in XML, thefractionDigitsfacet constrains the value space of xs:decimal, not its lexical representation. For example, 1.23 and 1.23000 are both valid whenfractionDigits="2".Whilst
totalDigitscan be mapped tomaxInclusive(unlessmaxInclusiveis explicitly provided), the maximum precision of a decimal number does not have an equivalent Orchestra attribute. The precision is quite common information and sometimes even part of a logical data element, e.g.AvgPxPrecision(74)andPricePrecision(2349)in FIX. It seems more efficient to have an attribute for fields and datatype mappings.It is proposed to add two optional attributes
minPrecisionandmaxPrecisionto define the minimum/maximum number of "meaningful" decimal places.