title: xml schema nested element within an element with attributes
body: <p>I am making a school assignment 
  This is my XML </p>
  
  <pre><code>&lt;lineup xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:noNamespaceSchemaLocation="ComplexTypeDemo.xsd"&gt;
    &lt;team teamName="Maple Leafs" city="Toronto"&gt;
      &lt;visitor/&gt;
        &lt;player number="17"&gt;
          &lt;name&gt;John Doe&lt;/name&gt;
          &lt;position&gt;Forward&lt;/position&gt;
        &lt;/player&gt;
        &lt;!--Continue 20 Iterations--&gt;
      &lt;/team&gt;
      &lt;team teamName="Rangers" city="New York"&gt;
       &lt;home/&gt;
        &lt;player number="17"&gt;
          &lt;name&gt;John Doe&lt;/name&gt;
          &lt;position&gt;Forward&lt;/position&gt;
        &lt;/player&gt;
        &lt;!--Continue 20 Iterations--&gt;
      &lt;/team&gt;
  &lt;/lineup&gt;
  </code></pre>
  
  <p>here is my schema document</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;xs:schema elementFormDefault="qualified"
      xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
    &lt;xs:element name="lineup"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="team" minOccurs="2" maxOccurs="2"&gt;
  
            &lt;xs:complexType&gt;
              &lt;xs:sequence&gt;
  
  
              &lt;xs:choice&gt;
                &lt;xs:element name="home"/&gt;
                &lt;xs:element name="visitor"/&gt;
              &lt;/xs:choice&gt;
  
                &lt;xs:element name="player" minOccurs="20" maxOccurs="20"&gt;
                  &lt;xs:complexType&gt;
                    &lt;xs:all&gt;
                      &lt;xs:element name="name" /&gt;
                      &lt;xs:element name="position"/&gt;
                    &lt;/xs:all&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:complexType&gt;
    &lt;/xs:element&gt;
  &lt;/xs:schema&gt;
  </code></pre>
  
  <p>i need to make a schema to validate this. but i can't figure out how to validate  because it is nested but it has attributes. I can only seem to do one or the other, but not both....</p>