This section describes all 14 facets supported in XSD 1.1: ordered, bounded, cardinality, numeric, whiteSpace, length, minLength, maxLength, pattern, enumeration, maxInclusive, maxExclusive, minExclusive, minInclusive, totalDigits, fractionDigits, Assertions, explicitTimezone.
XSD 1.1 supports 2 groups of facets:
1. Fundamental Facets - Facets that are defined on all simple built-in datatypes and should not be modified
when constructing new user-defined datatypes. There are 4 fundamental facets:
"ordered" - Indicates the order relation of values supported by this datatype.
"ordered" has 3 possible settings: "total", "partial", and "false".
"bounded" - Indicates whether a upper limit and a lower limit exist for all values supported by this datatype.
"bounded" has 2 possible settings: "true", and "false".
"cardinality" - Indicates if the number of values supported by this datatype is finite or not.
"cardinality" has 2 possible settings: "finite", and "countably infinite".
"numeric" - Indicates whether values supported by this datatype are numeric or not.
"numeric" has 2 possible settings: "true", and "false".
2. Constraining Facets - Facets that are defined on some simple built-in datatypes and could be modified
when constructing new user-defined datatypes. There are 14 fundamental facets:
"whiteSpace" - Indicates how witespace characters should be handled when mapping lexical representations to values.
"whiteSpace" has 3 possible settings: "preserve", "replace", and "collapse".
"length" - Indicates that the number of units in each value must be equal to this setting.
Value units are defined differently for different datatypes.
For example, "length" on "string" is the number of characters in the value.
"length" on "hexBinary" is the number of bytes in the value.
"minLength" - Indicates that the number of units in each value must be equal to or greater than this setting.
"maxLength" - Indicates that the number of units in each value must be equal to or less than this setting.
"pattern" - Indicates that the lexical representation must match this setting as a regular expression pattern.
"enumeration" - Indicates that values are enumerated in this setting.
"maxInclusive" - Indicates that values must be equal to or less than this setting.
"maxExclusive" - Indicates that values must be less than this setting.
"minExclusive" - Indicates that values must be equal to or greater than this setting.
"minInclusive" - Indicates that values must be greater than this setting.
"totalDigits" - Indicates that the total precision of each value must be equal to or less than this setting.
"totalDigits" is only applicable to "decimal" and its derived datatypes.
"fractionDigits" - Indicates that the arithmetic precision of each value must be equal to or less than this setting.
"fractionDigits" is only applicable to "decimal" and its derived datatypes.
"Assertions" - Indicates that values must satisfy this setting as an XPath expression.
"explicitTimezone" - Indicates that whether timezone unit is required or not in each value.
"explicitTimezone" has 3 possible settings: "required", "prohibited" and "optional".
"explicitTimezone" is only applicable to date and time related datatypes.