title: XML Schema same attributes names but different specific attribute sets of values?
body: <p>I wish to create a repeating same named element with two attributes for which the values of each are tied to each other. i.e.</p>
  
  <pre><code>&lt;anElement id="R1" description="Some definition for R1"/&gt;  
  &lt;anElement id="R2" description="Some definition for R2"/&gt;
  </code></pre>
  
  <p>Ideally I would define "groups" of id and description attributes together and reference one of the groups for each instance of anElement element.</p>
  
  <pre><code>&lt;complexType name="RElements"&gt;
      &lt;choice&gt;
          &lt;element name="anElement" type="R1Group"/&gt;
          &lt;element name="anElement" type="R2Group"/&gt;
      &lt;/choice&gt;
  &lt;/complexType&gt;
  &lt;complexType name="RElementsType"&gt;
      &lt;sequence&gt;
          &lt;element ref="RElements" minOccurs="1" maxOccurs="unbounded"/&gt;
      &lt;/sequence&gt;
  &lt;/complexType&gt;
  </code></pre>
  
  <p>But Choice doesn't allow multiples of the same element name.  I see discussions about how to have multiple elements of the same name but none allow additional attributes let alone having attributes tied to each other.  The only way that I can get close is by having a different named element based on the id.  i.e. </p>
  
  <pre><code>&lt;R1 id="R1" description="Some definition for R1"/&gt;  
  &lt;R2 id="R2" description="Some definition for R2"/&gt;
  </code></pre>
  
  <p>Any suggestions?</p>