XML Tutorial/XML Schema/short

Материал из Web эксперт
Перейти к: навигация, поиск

The short data type is derived from the int type.

The value space is integer values from ?768 up to and including 32767. 
The lexical space is a finite-length sequence of decimal digits with an optional leading - or +.
<!-- schema -->
<xsd:complexType name="shortlist">
  <xsd:sequence>
   <xsd:element name="event" minOccurs="0" maxOccurs="unbounded">
    <xsd:complexType>
     <xsd:complexContent>
      <xsd:extension base="xsd:anyType">
       <xsd:attribute name="recur" type="xsd:short"/>
      </xsd:extension>
     </xsd:complexContent>
    </xsd:complexType>
   </xsd:element>
  </xsd:sequence>
</xsd:complexType>
<!-- instance document -->
<event recur="365">A</event>
<event recur="365">B</event>
<event recur="250">C</event>