xs:pattern with xs:dateTime : dateTime « XML Schema « XML






xs:pattern with xs:dateTime


<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
  targetNamespace="http://www.java2s.com" xmlns="http://www.java2s.com"
  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>

 








Related examples in the same category