title: xml nillable validation in xsd
body: <p>Sample xml to play with</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
   &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="qualified"&gt;
   &lt;xs:element name="UsersList"&gt;
      &lt;xs:complexType&gt;    
     &lt;xs:sequence&gt;    
          &lt;xs:element ref="User" maxOccurs="unbounded"/&gt;
    &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
    
     &lt;xs:element name="User"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
     &lt;xs:element ref="Name" /&gt;
     &lt;xs:element ref="BirthTime" /&gt;
     &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
     &lt;/xs:element&gt;
    
   
     &lt;xs:element name = "Name"&gt;
      &lt;xs:simpleType&gt;
      &lt;xs:restriction base = "xs:string"&gt;
      &lt;xs:pattern value="[a-zA-Z0-9]*"/&gt;
      &lt;/xs:restriction&gt;
      &lt;/xs:simpleType&gt;
   &lt;/xs:element&gt;
  
     &lt;xs:element name="BirthTime"&gt;
    &lt;xs:simpleType&gt;
      &lt;xs:restriction base="xs:string"&gt;
     &lt;xs:pattern value="(0[0-9]|[1][0-9]|2[0-3]):[0-5][0-9]"/&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
     &lt;/xs:element&gt;
     
   &lt;/xs:schema&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;UsersList&gt;
    &lt;User&gt;
      &lt;Name&gt;sam&lt;/Name&gt;
      &lt;BirthTime&gt;&lt;/BirthTime&gt;
    &lt;/User&gt;
    &lt;User&gt;
      &lt;Name&gt;wit&lt;/Name&gt;
      &lt;BirthTime&gt;&lt;/BirthTime&gt;
    &lt;/User&gt;
  &lt;/UsersList&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I want the birth time should allow empty value or value with HH:MM format. for HH:MM format i already manged but unable to make it to accept empty or null values. I even tried with nillable="true". but no hope. is there anyway to achieve this please</p>