title: The element type "tag" must be terminated by the matching end-tag "</tag>"
body: <p>The code below contains an error.</p>
  <blockquote>
  <p>The element type <code>&quot;xs:sequence&quot;</code> must be terminated by the matching
  end-tag <code>&quot;&quot;</code>, at 37:5, ie line 35 column 5.</p>
  </blockquote>
  <p>I think it's referring to this:</p>
  <pre><code> &lt;/xs:element&gt;
  </code></pre>
  <p>but I can't figure out what's wrong.</p>
    
  <pre><code>&lt;xs:schema xmlns:xs=&quot;http://www.joe.bloggs.org/2020/XMLSchema&quot; &gt;
  
   
  
  &lt;xs:element name=&quot;Employee_Data&quot; type=&quot;EmployeeDataType&quot; /&gt;
  
  &lt;xs:complexType name=&quot;EmployeeDataType&quot;&gt;
  
    &lt;xs:sequence&gt;
  
     &lt;xs:element ref=&quot;Employee&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&quot; /&gt;
  
    &lt;/xs:sequence&gt;
  
  &lt;/xs:complexType&gt;
  
   
  
  &lt;xs:element name=&quot;Employee&quot; type=&quot;EmployeeType&quot; /&gt;
  
  &lt;xs:complexType name=&quot;EmployeeType&quot;&gt;
  
    &lt;xs:sequence &gt;
  
     &lt;xs:element ref=&quot;Name&quot; /&gt;
  
     &lt;xs:element ref=&quot;Age&quot; /&gt;
  
     &lt;xs:simpleType&gt;
     &lt;xs:restriction base=&quot;xs:integer&quot;&gt;
     &lt;xs:minInclusive value=&quot;0&quot;/&gt;
     &lt;xs:maxInclusive value=&quot;120&quot;/&gt;
     &lt;/xs:restriction&gt;
     &lt;/xs:simpleType&gt;
     &lt;/xs:element&gt;
  
    
  
     &lt;xs:element ref=&quot;Start Date&quot; /&gt;
  
     &lt;xs:element ref=&quot;Annual Income” /&gt;
  
           &lt;xs:complexType&gt;
  
              &lt;xs:simpleContent&gt;
  
                  &lt;xs:extension base=&quot;xs:double&quot;&gt;
  
                      &lt;xs:attribute name=&quot;currency&quot;&gt;
  
                          &lt;xs:simpleType&gt;
  
                              &lt;xs:restriction base=&quot;xs:string&quot;&gt;
  
                                  &lt;xs:enumeration value=&quot;Pounds&quot; /&gt;
  
                                  &lt;xs:enumeration value=&quot;Euros&quot; /&gt;
  
                                  &lt;xs:enumeration value=&quot;USdollars&quot; /&gt;
  
                              &lt;/xs:restriction&gt;
  
                          &lt;/xs:simpleType&gt;
  
                      &lt;/xs:attribute&gt;
  
                  &lt;/xs:extension&gt;
  
              &lt;/xs:simpleContent&gt;
  
          &lt;/xs:complexType&gt;
  
      &lt;/xs:element&gt;
  
     &lt;xs:element ref=&quot;Department&quot; /&gt;
  
     &lt;xs:simpleType&gt;
     &lt;xs:restriction base=&quot;xs:string&quot;&gt;
     &lt;xs:enumeration value=&quot;Sales&quot;/&gt;
     &lt;xs:enumeration value=&quot;Marketing&quot;/&gt;
     &lt;xs:enumeration value=&quot;IT&quot;/&gt;
     &lt;/xs:restriction&gt;
     &lt;/xs:simpleType&gt;
     &lt;/xs:element&gt;
  
   
  
  &lt;xs:element name=&quot;Name&quot; type=&quot;xs:string&quot; /&gt;
  
  &lt;xs:element name=&quot;Start Date&quot; type=&quot;xs:date&quot; /&gt;
  
   
  
  &lt;/xs:schema&gt;
  </code></pre>