title: How to use XSD 1.0 to ensure that only one element in sequence has child?
body: <p>I have to validate the XML that may be in any one of the below form</p>
  
  <pre><code>&lt;myshape&gt;
          &lt;dimension/&gt;
          &lt;mycircle&gt;
              &lt;radius&gt;2&lt;/radius&gt;
          &lt;/mycircle&gt;
  &lt;/myshape&gt;
  
  &lt;myshape&gt;
          &lt;dimension&gt;
              &lt;height&gt;5&lt;/height&gt;
          &lt;/dimension&gt;
          &lt;mycircle/&gt;
  &lt;/myshape&gt;
  </code></pre>
  
  <p>That is, only one element should contain the value and other should not.</p>
  
  <p>I've tried <code>xs:choice</code>, but the problem is , I would have both elements in xml but only one should contain the child elements. How can I validate that?</p>
  
  <p>Any help would be appreciated.</p>
  
  <p>PS: This is an issue in legacy code, so I can't switch to XSD1.1</p>