Version 8.2.2
 —  Tamino XML Schema Reference Guide  —

xs:maxInclusive

Purpose

This element is a restriction facet used to specify an inclusive upper bound as a constraint of the value space for a data item.

The value of the constraint is given by the value attribute.

Parent element xs:restriction
Child elements None
Attributes fixed, value
Restrictions

The following restrictions apply for the xs:maxInclusive element:

  • The xs:maxInclusive element may not be specified simultaneously with the xs:maxExclusive element.

  • The xs:maxInclusive must be valid with respect to any xs:minInclusive or xs:minExclusive facet also specified.

  • The xs:maxInclusive element must be chosen in such a way that all values allowed for the restricted type also belong to the value space of the base type.

  • The following update schema constraint applies to the xs:maxInclusive element:

    The value of xs:maxInclusive is not permitted to become more restrictive after update schema.

Attributes
Name Type Description
fixed xs:boolean If "true", the value of this facet must not be changed in a derived type. Default: "false".
value The type of the xs:maxInclusive element depends on the base of the restriction. The value attribute specifies the maximum value of the restricted type. The exact value of the value attribute is included within the value space.

Example

The following example shows a simple type definition based on a restriction using the xs:maxInclusive element:

<xs:simpleType name='upto40'>
  <xs:restriction base='xs:integer'>
    <xs:maxInclusive value='40'/>
  </xs:restriction>
</xs:simpleType>

The value space of the simple type "upto40" is restricted to values less than or equal to 40. This means 40 is the largest allowed element in this value space.

Top of page