Formal reference: XML Schema Part 2: Datatypes.
A 32-bit signed integer is used rather than an arbitrary precision integer to implement the length, minLength, maxLength, totalDigits and fractionDigits facets.
Similarly, the components of the duration datatype are implemented using 32-bit integers and double-precision floating-point numbers.
The length facet of datatype QName is implemented as the number of characters in the local part of the name (that is, the prefix part is not taken into account by facet length).