title: Make an element optional/mandatory based on another element using xsd:assert
body: <p>I believe XSD 1.1 has asserts that allows conditional logic.</p>
  
  <p>I have a schema like this:</p>
  
  <pre><code>        &lt;xs:element minOccurs="0" maxOccurs="1" name="Type" type="xs:integer" /&gt;
          &lt;xs:element minOccurs="0" maxOccurs="1" name="Comment" type="xs:string" /&gt;
  </code></pre>
  
  <p>I want the <code>Comment</code> section to be mandatory only if the <code>Type</code> is 0. If <code>Type</code> is anything else, I want the <code>Comment</code> element to be optional.</p>
  
  <p>How do I achieve this using asserts?</p>