title: Element 'programmeType' has both a 'type' attribute and a 'anonymous type' child. Only one of these is allowed for an element
body: <p>M stuck with this error please help me out.....</p>
  
  <p>My .xml file is</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
  &lt;addresses xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:noNamespaceSchemaLocation='Lsc.xsd'&gt;
  &lt;lscApplicationform&gt;
   &lt;programmes&gt;
    &lt;course&gt;MBA(12 months)&lt;/course&gt;
   &lt;/programmes&gt;
   &lt;personalDetails&gt;
   &lt;surname&gt;Sagar&lt;/surname&gt;
   &lt;firstname&gt;Shiva&lt;/firstname&gt;
   &lt;gender&gt;Male&lt;/gender&gt;
   &lt;placeofbirth&gt;Ulhasnagar&lt;/placeofbirth&gt;
   &lt;nationality&gt;Indian&lt;/nationality&gt;
   &lt;countryofbirth&gt;India&lt;/countryofbirth&gt;
   &lt;dateofbirth&gt;1993-06-03&lt;/dateofbirth&gt;
  &lt;/personalDetails&gt;
  &lt;permanentAddress&gt;
  &lt;/permanentAddress&gt;
  &lt;/lscApplicationform&gt;
  &lt;/addresses&gt;
  </code></pre>
  
  <p>and my xsd file is</p>
  
  <pre><code>&lt;?xml version="1.0"?&gt;
      &lt;xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"&gt;
       &lt;xs:element name="lscApplicationForm"&gt;
        &lt;xs:complexType&gt;
         &lt;xs:sequence&gt;
          &lt;xs:element name="programmeType" type="xs:string"&gt;
                 &lt;xs:simpleType&gt;
           &lt;xs:restriction base="xs:string"&gt;
            &lt;xs:enumeration value="MBA( months)"/&gt;
            &lt;xs:enumeration value="MBA( months)"/&gt;
            &lt;xs:enumeration value="MSc InformationTechnology"/&gt;
            &lt;xs:enumeration value="Msc InternationalHospitalityManagement"/&gt;
            &lt;xs:enumeration value="Msc InternationalTourismManagement"/&gt;
            &lt;xs:enumeration value="BA(Hons)BusinessStudies"/&gt;
            &lt;xs:enumeration value="BSc(Hons)Computing"/&gt;
            &lt;xs:enumeration value="PhD/ProfessionaDoctorate"/&gt;
            &lt;xs:enumeration value="Other(pleasespecify)"/&gt;
           &lt;/xs:restriction&gt;
             &lt;/xs:simpleType&gt;
  
  
  
  
                  &lt;xs:element name="personalDetails" type="xs:string"/&gt;
          &lt;xs:complexType&gt;
           &lt;xs:sequence&gt;
            &lt;xs:element name="Surname" type="xs:string"/&gt;
             &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:string"&gt;
               &lt;xs:length value="100"/&gt;
              &lt;/xs:restriction&gt;
             &lt;/xs:simpleType&gt;
  
  
            &lt;xs:element name="Gender"/&gt;
             &lt;xs:simpleType&gt;
              &lt;xs:restriction base="xs:string"&gt;
               &lt;xs:pattern value="male|female"/&gt;
              &lt;/xs:restriction&gt;
             &lt;/xs:simpleType&gt;
  
  
            &lt;xs:element name="placeOfBirth" type="xs:string"/&gt;
            &lt;xs:element name="Nationality" type="xs:string"/&gt;
            &lt;xs:element name="CountryOfBirth" type="xs:string"/&gt;
            &lt;xs:element name="dob" type="xs:date"/&gt;
           &lt;/xs:sequence&gt;    
          &lt;/xs:complexType&gt;
          &lt;xs:element name="permanentAddress" type="xs:string"/&gt;
                 &lt;xs:complexType&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>and one more error is
  s4s-elt-must-match.1: The content of 'programmeType' must match (annotation?, (simpleType | complexType)?, (unique | key | keyref)*)). A problem was found starting at: element.</p>
  
  <p>Thanks in advance....</p>