XML technologies / XML Schema / Data type reference / xs:short

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

Signed 16-bit integers

Derived from: xs:int

Primitive type: xs:decimal

Known subtypes: xs:byte

Facets: xs:enumeration, xs:fractionDigits, xs:maxExclusive, xs:maxInclusive, xs:minExclusive, xs:minInclusive, xs:pattern, xs:totalDigits, xs:whiteSpace

Definition

<xs:simpleType name="short" id="short">
    <xs:restriction base="xs:int">
        <xs:minInclusive value="-32768"/>
        <xs:maxInclusive value="32767"/>
    </xs:restriction>
</xs:simpleType>

Description

The value space of xs:short is the set of ordinary short integers, 16 bits, from -32768 to 32767. The lexical space permits any number of insignificant leading zeros.

Restrictions

A decimal point is forbidden, even when followed only by insignificant zeros.

Example

Valid values include "-32768", "0", "-0000000000000000000005" or "32767".

Invalid values include "32768" and "1.".

   

 

 

 

back to top