XML Tutorial/XML Schema/duration

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

The duration datatype represents a duration

   <source lang="xml">

<xsd:element name="vacation">

 <xsd:simpleType>
  <xsd:restriction base="xsd:duration">
   <xsd:pattern value="P\d+D\d+H\d+M\d+S"/>
  </xsd:restriction>
 </xsd:simpleType>

</xsd:element>

<vacation>P10D2H30M45S</vacation></source>