According to the documentation the totalDigits contains the fractionDigits: "xs:totalDigits defines the maximum number of digits of decimal and derived datatypes (both after and before the decimal point, not counting the decimal point itself)."
https://www.oreilly.com/library/view/xml-schema/0596002521/re52.html
At the moment totalDigits value in the xsd will be copied one-to-one into the integer attribute of Digit annotation without checking the fractionDigits of xsd.
That means when following is set into the xsd:
According to the documentation the totalDigits contains the fractionDigits: "xs:totalDigits defines the maximum number of digits of decimal and derived datatypes (both after and before the decimal point, not counting the decimal point itself)." https://www.oreilly.com/library/view/xml-schema/0596002521/re52.html At the moment totalDigits value in the xsd will be copied one-to-one into the integer attribute of Digit annotation without checking the fractionDigits of xsd. That means when following is set into the xsd:
the JAXB class gets then the following annotation:
@Digits(integer = 10, fraction = 2)
But in these case following annotation would be correct:
@Digits(integer = 8, fraction = 2)
Because the integer attribute are only the integral digits and doesn't include the fraction digits.