title: Cant get child elements of a set atmost once in XSD
body: <p>I have the following schema-</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
  
  &lt;xsd:element name="Type"&gt;
  &lt;xsd:complexType&gt;
  &lt;xsd:sequence&gt;
  &lt;xsd:choice  minOccurs="0" maxOccurs="unbounded"&gt;
  &lt;xsd:element name="First"&gt;
  &lt;xsd:complexType&gt;
  &lt;xsd:choice minOccurs="0" maxOccurs="5"&gt;
          &lt;xsd:element name="a" type="xsd:decimal" minOccurs="0" maxOccurs="1"/&gt;
          &lt;xsd:element name="b" type="xsd:int" minOccurs="0" maxOccurs="1"/&gt;
          &lt;xsd:element name="c" type="xsd:int" minOccurs="0" maxOccurs="1"/&gt;
          &lt;xsd:element name="d" type="xsd:int" minOccurs="0" maxOccurs="1"/&gt;
          &lt;xsd:element name="e" type="xsd:int" minOccurs="0" maxOccurs="1"/&gt;
  &lt;/xsd:choice&gt;
  &lt;/xsd:complexType&gt;
  &lt;/xsd:element&gt;
  
  &lt;xsd:element name="Second" type="xsd:base64Binary"/&gt;
  &lt;/xsd:choice&gt;
  &lt;/xsd:sequence&gt;
  &lt;/xsd:complexType&gt;
  &lt;/xsd:element&gt;
  &lt;/xsd:schema&gt;
  </code></pre>
  
  <p>The pattern that I want to generate is that XML can contain First and Second elements any number of times and any order but element First should have child elements occurred at most once. i.e, a,b,c,d,e can occur at most once. I am not able to achieve this second part where child elements occur at most once. Any ideas why?</p>