title: XSD : Workaround to Unique Particle Attribution
body: <p>I have this schema that triggers Unique Particle Attribution violation. I do understand why, but I don't see any other way to express it. The schema is : </p>
  
  <pre><code>&lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;xs:element name="Root"&gt;
      &lt;xs:complexType mixed="true"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="Element" minOccurs="1" maxOccurs="unbounded"&gt;
            &lt;xs:complexType mixed="true"&gt;
              &lt;xs:attribute name="First" use="required"/&gt;
              &lt;xs:attribute name="SomeAttribute" use="required"/&gt;
            &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
          &lt;xs:element name="Element" minOccurs="0" maxOccurs="1"&gt;
            &lt;xs:complexType mixed="true"&gt;
              &lt;xs:attribute name="Second" use="required"/&gt;
              &lt;xs:attribute name="SomeOtherAttribute" use="required"/&gt;
            &lt;/xs:complexType&gt;
          &lt;/xs:element&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>and the XML it should validate : </p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;Root&gt;
      &lt;Element First="true" SomeAttribute="abc"/&gt;
      &lt;Element Second="true" SomeOtherAttribute="def"/&gt;
  &lt;/Root&gt;
  </code></pre>
  
  <p>I don't want to simplify the schema, meaning I don't want to make any of the attributes optionnal, or allow a mix between attributes... Also I can't change the name of "Element" to something like "FirstElement", "SecondElement".
  Is there a way around this in XSD ?</p>
  
  <p>Thanks for your help!</p>