XML technologies / XML Schema / XML Schema element reference / xs:minInclusive

(Excerpt from “XML Schema” by Eric van der Vlist)

Facet specifying an inclusive minimum value.

<xs:minInclusive
    fixed = xs:boolean : "false"
    id = xs:ID
    value = anySimpleType
    {beliebige Attribute mit einem Nicht-Schema-Namensraum}
    >
    Content: (xs:annotation?)
</xs:minInclusive>

May occur within: xs:restriction (simple type), xs:restriction (simple content)

May be used as a facet for: xs:byte, xs:date, xs:dateTime, xs:decimal, xs:double, xs:duration, xs:float, xs:gDay, xs:gMonth, xs:gMonthDay, xs:gYear, xs:gYearMonth, xs:int, xs:integer, xs:long, xs:negativeInteger, xs:nonNegativeInteger, xs:nonPositiveInteger, xs:positiveInteger, xs:short, xs:time, xs:unsignedByte, xs:unsignedInt, xs:unsignedLong, xs:unsignedShort

Description

xs:minInclusive specifies an exclusive minimum value. To be valid, a value must be greater than the value of xs:mInclusive or equal to it.

This facet affects the value space.

Restrictions

It is forbidden to define both xs:minExclusive and xs:minInclusive within the same restriction step. Although not explicitly stated in the recommendation, defining several xs:minInclusive facets within one restriction step is also meaningless.

Within a restriction step, xs:minInclusive also interacts with xs:maxExclusive and xs:maxInclusive, since inconsistent values produce data types with empty value spaces.

xs:minInclusive must restrict its base type’s value space, and the facet value must belong to that space.

Fixing the xs:minInclusive facet does not fix the xs:minExclusive facet. Use two restriction steps to define both facets, since applying both in the same step is forbidden.

Example

<xs:simpleType name="positive">
    <xs:restriction base="xs:double">
        <xs:minInclusive value="0"/>
    </xs:restriction>
</xs:simpleType>

Attributes

fixed
If the value is true, this facet’s value cannot be modified in further restrictions.

id
Element ID according to W3C XML Schema.

value
Facet value, which must belong to the base type’s value space.

   

 

 

 

back to top