title: How to specify a list of choices in XSD
body: <p>I have an XSD definition that has a list of tagged elements. In what way is it possible to allow developer's to only select from a list of elements already defined in the XML file when entering values for a choice-restricted element?</p>
  
  <p>In other words, given this XML declaration:</p>
  
  <pre><code>&lt;collection&gt;
        &lt;myItem name="Item_1"&gt;
          &lt;childElement /&gt;
        &lt;/myItem&gt;
  
        &lt;myItem name="Item_2"&gt;
          &lt;childElement&gt;
            &lt;item name="Item_1"/&gt;
          &lt;/childElement&gt;
        &lt;/myItem&gt;
  
        &lt;myItem name="Item_3"&gt;
          &lt;childElement&gt;
            &lt;item name="Child_2"/&gt;
          &lt;/childElement&gt;
        &lt;/myItem&gt;
  &lt;/collection&gt;
  </code></pre>
  
  <p>... and this XSD definition</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;xs:element name="collection"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element maxOccurs="unbounded" name="collection"&gt;
            &lt;xs:complexType&gt;
              &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
                &lt;xs:element name="childElement" &gt;
                  &lt;xs:complexType&gt;
                    &lt;xs:sequence  minOccurs="0" maxOccurs="unbounded"&gt;
                      &lt;xs:element name="item"&gt;
                        &lt;xs:complexType&gt;
                          &lt;xs:attribute name="name" type="xs:string" use="optional" /&gt;
                        &lt;/xs:complexType&gt;
                      &lt;/xs:element&gt;
                    &lt;/xs:sequence&gt;
                  &lt;/xs:complexType&gt;
                &lt;/xs:element&gt;
              &lt;/xs:sequence&gt;
  
              &lt;xs:attribute name="name" type="xs:string" 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>I would like to enable users to select from  a list of <code>myItem</code> elements already defined in the XML file whenever they want to enter the <code>name</code> value of the <code>childEelement</code>?</p>
  
  <p>This concept is seen when selecting attributes values in XAML or even some of Visual Studio 2008's schemas.</p>