title: XSD choice between sequence or single element
body: <p>I'm trying to create a choice between a sequence of two elements, and one single element, as such:</p>
  
  <pre><code>&lt;xs:element name="LoadStationsRequest"&gt;
  &lt;xs:choice&gt;
  
      &lt;xs:complexType&gt;
          &lt;xs:sequence&gt; 
              &lt;xs:element name="path" type="xs:string" /&gt;
              &lt;xs:element name="fileName" type="xs:string" /&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  
      &lt;xs:complexType&gt;
          &lt;xs:sequence&gt;
              &lt;xs:element name="row" type="xs:string" /&gt;
          &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
  
  &lt;/xs:choice&gt;
  &lt;/xs:element&gt;
  </code></pre>
  
  <p>The problem is that the choice tag accepts any of the three elements within it, "path", "fileName" and "row".</p>
  
  <p>What I want is either path AND filename, or ONLY row.</p>
  
  <p>Is this doable? Any clues of how to solve this?</p>
  
  <p>Current output:</p>
  
  <pre><code>     &lt;v1:LoadStationsRequest&gt;
       &lt;!--You have a CHOICE of the next 2 items at this level--&gt;
       &lt;v1:path&gt;?&lt;/v1:path&gt;
       &lt;v1:fileName&gt;?&lt;/v1:fileName&gt;
       &lt;v1:row&gt;?&lt;/v1:row&gt;
       &lt;/v1:LoadStationsRequest&gt;
  </code></pre>