title: Unique Particle Attribution Error when trying to force single occurence of element
body: <p>I am trying to adjust my xsd that it allows as child one element with the name <strong>processName</strong> and otherwise any element.<br>
  For that I prepared a small <strong>complexType</strong>:</p>
  
  <pre><code>&lt;complexType name="configType"&gt;
  &lt;!--    &lt;xsd:choice&gt; --&gt;
      &lt;sequence&gt;
          &lt;element name="processName" type="string" maxOccurs="1"/&gt;
          &lt;xsd:any minOccurs="0" maxOccurs="unbounded"/&gt;
      &lt;/sequence&gt;
  &lt;!--    &lt;/xsd:choice&gt; --&gt;
  &lt;/complexType&gt;
  </code></pre>
  
  <p>My problem is that it doesn't prevent any other occurrence of the <strong>processName</strong>:</p>
  
  <pre><code>&lt;config&gt;
      &lt;process:processName&gt;&lt;/process:processName&gt;
      &lt;test&gt;&lt;/test&gt;
      &lt;test2&gt;&lt;/test2&gt;
      &lt;process:processName&gt;&lt;/process:processName&gt;
  &lt;/config&gt;
  </code></pre>
  
  <p>I have tried to use choice but it ends with the validation error</p>
  
  <blockquote>
    <p>processName and WC[##any] (or elements from their substitution group) violate "Unique Particle Attribution". During validation against this schema, ambiguity would be created for those two particles.</p>
  </blockquote>
  
  <p>The rule isn't active any more in XSD v 1.1, <del>but all my XML files are version 1.0. But I think it isn't possible to check with newer schema version an older file.</del></p>
  
  <blockquote>
    <p>This particular example no longer violates the Unique Particle Attribute constraint in XML Schema version 1.1, which disambiguates it by saying that when an element matches both an element particle and a wildcard, the element particle wins. However, the UPA constraint itself remains in version 1.1.</p>
  </blockquote>
  
  <p>Is it possible to enforce only one time occurence of <strong>processName</strong>?<br>
  Thanks for any hints.</p>
  
  <p><strong>EDIT:</strong><br>
  With some hints from ColdFusion I was able to create a piece of XSD1.1 schema which allows the ambigous declaration:</p>
  
  <pre><code>&lt;sequence&gt;
      &lt;element name="processName" type="string" minOccurs="0" maxOccurs="1"/&gt;
      &lt;xsd:any minOccurs="0" maxOccurs="unbounded" processContents="lax"/&gt;
  &lt;/sequence&gt;
  </code></pre>
  
  <p>Now it is possible to have multiple times <strong>processName</strong>.</p>