title: XSD: what is the significance of minOccurs="0" and defaultValue="x"
body: <p>I find myself wondering what the purpose of the defaultValue attribute in XSD is.
  Consider, for example a complexType</p>
  
  <pre><code> &lt;xs:complexType name="myType"&gt;
      &lt;xs:sequence&gt;
          &lt;xs:element name="test1" type="type1" defaultValue="x" minOccurs="0" maxOccurs="1"/&gt;
          &lt;xs:element name="test2" type="type2"/&gt;
      &lt;/xs:sequence&gt;
   &lt;/xs:complexType&gt;
  </code></pre>
  
  <p>I will be able to validate an XML file of the form</p>
  
  <pre><code>&lt;myType&gt;
    &lt;test2&gt;dsjhfdshflk&lt;/test2&gt;
  &lt;/myType&gt;
  </code></pre>
  
  <p>Now what's the point of the defaultValue attribute of <code>&lt;test1&gt;</code> ? </p>
  
  <p>Thanks a lot in advance</p>
  
  <p>Mischa</p>