title: How to make tags children unique?
body: <p>How to prohibit duplicate tag in my restriction tag in my xml file?
  for example in my xml file I have two locale tag,but it should be only one tag</p>
  
  <p>this is my xml file :</p>
  
  <pre><code>    &lt;app:string name="firstName"&gt;
          &lt;app:restriction&gt;
              &lt;app:regex&gt;^\w*$&lt;/app:regex&gt;
              &lt;app:type/&gt;
              &lt;app:locale/&gt;
              &lt;app:locale/&gt;
          &lt;/app:restriction&gt;
      &lt;/app:string&gt;
  </code></pre>
  
  <p>and this is my xsd for string tag:</p>
  
  <pre><code>&lt;xs:element name="string"&gt;
      &lt;xs:complexType&gt;
          &lt;xs:complexContent&gt;
              &lt;xs:extension base="main:BaseType"&gt;
                  &lt;xs:sequence&gt;
                      &lt;xs:element name="restriction" type="main:StringRestriction" minOccurs="0"
                                  maxOccurs="1"/&gt;
                  &lt;/xs:sequence&gt;
                  &lt;xs:attribute name="lang" type="main:LocaleTypes"/&gt;
              &lt;/xs:extension&gt;
          &lt;/xs:complexContent&gt;
      &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
  
  &lt;xs:complexType name="BaseType"&gt;
      &lt;xs:attribute name="name" type="main:nameType" use="required"/&gt;
      &lt;xs:attribute name="readonly" type="xs:boolean" use="optional" default="true"/&gt;
  &lt;/xs:complexType&gt;
  
  &lt;xs:complexType name="StringRestriction"&gt;
      &lt;xs:complexContent&gt;
          &lt;xs:extension base="main:RestrictionBase"&gt;
              &lt;xs:sequence&gt;
                  &lt;xs:choice maxOccurs="1"&gt;
                      &lt;xs:element type="xs:string" name="locale"/&gt;
                      &lt;xs:element type="xs:string" name="type"/&gt;
                      &lt;xs:element type="xs:string" name="regex"/&gt;
                      &lt;xs:element type="xs:string" name="maxLen"/&gt;
                      &lt;xs:element type="xs:string" name="minLen"/&gt;
                  &lt;/xs:choice&gt;
              &lt;/xs:sequence&gt;
          &lt;/xs:extension&gt;
      &lt;/xs:complexContent&gt;
  &lt;/xs:complexType&gt;
  </code></pre>