title: XSD Verify attribute is set on only one element
body: <p>I have a pre-existing XML that I'm writing a XSD for.  The relevant section is basically:</p>
  
  <pre><code>&lt;color a='1' default='true'&gt;Red&lt;/foo&gt;
  &lt;color a='2'&gt;Yellow&lt;/foo&gt;
  &lt;color a='3'&gt;Blue&lt;/foo&gt;
  </code></pre>
  
  <p>I want to validate that only one of the <code>foo</code> elements has an attribute <code>default='true'</code>.  Note the other elements can either have <code>default='false'</code> or not have it at all (in which case it defaults to <code>false</code>).</p>
  
  <p>I tried to use a key but it doesn't work in the example above because there's multiple <code>default='false'</code> values which is not unique.</p>
  
  <p>Can such validation be done with XSD 1.0?</p>
  
  <p>(I can't change the XML format unfortunately.)</p>