title: Refering to dynamically selected keys in XML Schemas
body: <p>If I have an XML document that goes something like this:</p>
  
  <pre><code>&lt;Choices name="Numbers"&gt;
      &lt;Choice&gt;1&lt;/Choice&gt;
      &lt;Choice&gt;2&lt;/Choice&gt;
      &lt;Choice&gt;3&lt;/Choice&gt;
  &lt;/Choices&gt;
  &lt;Choices name="Letters"&gt;
      &lt;Choice&gt;A&lt;/Choice&gt;
      &lt;Choice&gt;B&lt;/Choice&gt;
      &lt;Choice&gt;C&lt;/Choice&gt;
  &lt;/Choices&gt;
  &lt;Selected&gt;
      &lt;Selection category="Letters"&gt;B&lt;/Selection&gt;
  &lt;/Selected&gt;
  </code></pre>
  
  <p>I would like to describe a constrain in an XSD that makes sure that the selection tags data only refers to choices in the category "Letters". Is this something that is doable? It is fairly easy to do it with keys as long as you are OK with it having any choice in any category as it's data, but I'm stumped on how to limit which categories choices it can refer to. </p>