
XML Schemas • 193
The two main facets applicable to numbers are xsd:totalDigits and xsd:fractionDigits. The xsd:
totalDigits facet specifies the maximum number of digits in a number. The xsd:fractionDigits, on
the other hand, specifies the maximum number of digits in the fractional part (i.e., in the part to the
right of the decimal point).
The enumeration facet in XML schemas allows us to specify a list of possible values for an element.
The XML document corresponding to this schema must have one of these values for that element.
The schema uses pattern facets to specify the contents of those elements whose value have a certain
pattern. ...