Mega Code Archive

 
Categories / XML Tutorial / XML Schema
 

Pattern for time

<?xml version="1.0"?> <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"   targetNamespace="http://www.rntsoft.com" xmlns="http://www.rntsoft.com"   elementFormDefault="qualified">   <xsd:element name="gestation">     <xsd:simpleType>       <xsd:restriction base="xsd:time">         <xsd:pattern value="P\d+D" />       </xsd:restriction>     </xsd:simpleType>   </xsd:element> </xsd:schema>