Empty optional element error?
<p>I have an element, <code>labels</code>, whose <code>minoccurs="0"</code> and <code>minLength="1"</code>. </p>

<pre><code>&lt;xs:element name="labels" type="x2x:labels" minOccurs="0" /&gt;

&lt;xs:simpleType name="labels"&gt;
        &lt;xs:restriction&gt; 
            &lt;xs:simpleType&gt; 
                &lt;xs:list itemType="xs:token" /&gt;
            &lt;/xs:simpleType&gt;    
            &lt;xs:minLength value="1" /&gt; 
        &lt;/xs:restriction&gt; 
    &lt;/xs:simpleType&gt;
</code></pre>

<p>When the <code>labels</code> is not set I get the following error:</p>

<blockquote>
  <p>Caused by: org.xml.sax.SAXParseException; lineNumber: 0; columnNumber: 0; 
  cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'labels'.</p>
</blockquote>

<p>As per my knowledge, if <code>minOccurs=0</code> and I am not setting the element, it should not given any error as it's meant to be optional.</p>