title: making an element optional using xsd -cvc-length-valid ERROR
body: <pre><code>&lt;xs:element name="CurrencyCode" minOccurs="0"&gt;
    &lt;xs:simpleType&gt;
      &lt;xs:restriction base="xs:string"&gt;
        &lt;xs:length value="3" /&gt;
      &lt;/xs:restriction&gt;
    &lt;/xs:simpleType&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>But if my  value is empty it returns an error </p>
  
  <blockquote>
    <p>cvc-length-valid: Value '' with length = '0' is not facet-valid with respect to length '3' for type '#AnonType_CurrencyCodeServiceServiceList'.</p>
  </blockquote>
  
  <p>So how can i deal with it ?</p>