Name

xs:maxExclusive — Facet to define a maximum (exclusive) value.

Synopsis

<xs:maxExclusive
           fixed          = xs:boolean : “false”
           id             = xs:ID
           value          = anySimpleType
           {any attributes with non-schema namespace}
           >
           Content: (xs:annotation?)
</xs:maxExclusive>

May be included in: xs:restriction (simple type), xs:restriction (simple content)

May be used as 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:maxExclusive defines an exclusive maximum value. To be valid, a value must be strictly less than the value of xs:maxExclusive. This facet constrains the value space.

Restrictions

It is forbidden to define both xs:maxExclusive and xs:maxInclusive in the same restriction step. Although not explicitly specified in the Recommendation, it doesn’t make sense to define several xs:maxExclusive facets in a single restriction step also.

Within a restriction step, xs:maxExclusive is also dependent on xs:minExclusive and xs:minInclusive, since using inconsistent values leads to datatypes with empty value spaces.

xs:maxExclusive must restrict the value space of its base type, and its value must be in the value space of the base type.

Fixing the maxExclusive facet doesn’t fix the xs:maxInclusive facet. ...

Get XML Schema now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.