XML/XML Schema/dateTime

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

xs:pattern with xs:dateTime

   <source lang="xml">

<?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

 targetNamespace="http://www.wbex.ru" xmlns="http://www.wbex.ru"
 elementFormDefault="qualified">
 
 <xsd:element name="data" type="noTimeZone"/>
 
 
 <xsd:simpleType name="noTimeZone">
   <xsd:restriction base="xsd:dateTime">
     <xsd:pattern value=".*T[^Z+-]*" />
   </xsd:restriction>
 </xsd:simpleType>

</xsd:schema>

</source>