title: How define several elements with same name, but different type in xsd:choice element?
body: <p>Is it possible in some way, to define an xsd scheme which could validate such xml:</p>
  
  <pre><code>&lt;item_list&gt;
    &lt;item ItemType="SimpleMessage" Caption="Simplest message"/&gt;
    &lt;item ItemType="ComplexMessage" SomeAttr="value"&gt;
      &lt;item_data&gt;some text&lt;/item_data&gt;
    &lt;/item&gt;
  &lt;/item_list&gt;
  </code></pre>
  
  <p>Problem is that i havn't find any possibility to define smth like:</p>
  
  <pre><code>  &lt;xsd:element name="Items"&gt;
        &lt;xsd:complexType&gt;
          &lt;xsd:choice&gt;
            &lt;xsd:element name="item" type="SimpleMessType"/&gt;
            &lt;xsd:element name="item" type="ComplexMessType"/&gt;
          &lt;/xsd:choice&gt;
        &lt;/xsd:complexType&gt;
    &lt;/xsd:element&gt;
  </code></pre>
  
  <p>But i need to check, that SimpleMessage has no child elements or additional attrs :(</p>