title: xml schema sequence multiple of same elements
body: <p>I am trying to understand example from w3 school about sequence element. I thought that element inside the sequence can show only once but example from w3 school lead me to believe otherwise. This is example...</p>
  
  <pre><code>&lt;xs:element name="pets"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence minOccurs="0" maxOccurs="unbounded"&gt;
        &lt;xs:element name="dog" type="xs:string"/&gt;
        &lt;xs:element name="cat" type="xs:string"/&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt; 
  </code></pre>
  
  <p>So explanation on w3 schools says that "This example shows a declaration for an element called "pets" that can have zero or more of the following elements, dog and cat, in the sequence element". I tried to test that by doing this....</p>
  
  <p>sorry second example i pasted by mistake....this is what i meant that wil not validate based on schema from the top...             </p>
  
  <pre><code>  &lt;pets&gt;
       &lt;dog&gt;something&lt;/dog&gt;
       &lt;dog&gt;something else&lt;/dog&gt;
       &lt;cat&gt;else&lt;/cat&gt;
    &lt;/pets&gt;
  </code></pre>
  
  <p>But validator gives me errors <a href="http://www.corefiling.com/opensource/schemaValidate.html" rel="nofollow">http://www.corefiling.com/opensource/schemaValidate.html</a>.
  I would like to understand both examples. Sequence where it is allowable to have multiple of same elements and also where each element in sequence must be present and must show once only.</p>
  
  <p>any examples and suggestions would be appreciated. </p>