Witam, mam do zrobienia zadanie z wykorzystaniem pliku XML schema. Projekt polega na modyfikacji dokumentu według podanych kroków. Prośba pierwsza - nie jestem w stanie wykonać kroku 9 oraz 7 - ciągle wyskakuje błąd. Prośba 2 - mógłby ktoś sprawdzić czy pozostałe punkty do 8 włącznie wykonałam poprawnie

<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                      targetNamespace="schedule"
                      xmlns="schedule"
                      elementFormDefault="qualified">
                      
    <xsd:element name="Schedule">
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="Event" type="eventType"  maxOccurs="unbounded"/>
               </xsd:sequence>
                 </xsd:complexType>
                   </xsd:element>

                    <xsd:complexType name="eventType">
                    
                          <!--point 9 -->               
<xsd:element name="Lesson"  type="lessonType" substitutionGroup="eventType" />
<xsd:element name="Seminar" type="seminaType" substitutionGroup="Event" />
<xsd:element name="Lab" type="labType" substitutionGroup="Event" />  
                    
                    
                        <xsd:sequence>

                        <xsd:element name="Title" type="xsd:string"/>                		
	 <!--point 4--> 
                            <xsd:element name="Lecture" minOccurs="2" maxOccurs="5"> 		
                            <xsd:complexType>
									<xsd:sequence>
									
										<xsd:element name="Day">
												
	 <!--point 2 --> 
 <xsd:simpleType>							
<xsd:restriction base="xsd:string">
<xsd:enumeration value="Monday"/>
<xsd:enumeration value="Tuesday"/>
<xsd:enumeration value="Wednesday"/>
<xsd:enumeration value="Thursday"/>
<xsd:enumeration value="Friday"/>
<xsd:enumeration value="Saturday"/>
<xsd:enumeration value="Sunday"/>
</xsd:restriction>
</xsd:simpleType>
                                                                                                 </xsd:element>
                                                                                                 
						<xsd:element name="Time" >
						
	 <!--point 3 -->         					
<xsd:simpleType >
<xsd:restriction base="xsd:integer"> 
 <xsd:minInclusive value="11"/>
  <xsd:maxInclusive value="11"/>
<xsd:pattern value="\d{2}:\d{2}-\d{2}:\d{2}"/>
</xsd:restriction>
</xsd:simpleType>
		                                                  </xsd:element>
						      </xsd:sequence>
											
	 <!--point 5 --> 
<xsd:attribute name="Classroom" type="xsd:string" use="required"/> 



								</xsd:complexType>
								</xsd:element>
							
							
							
                        </xsd:sequence>

                    </xsd:complexType>
 <!--extension data types   8a) -->                         
<xsd:complexType name="lessonType">  
 <xsd:complexContent>
<xsd:extension base="eventType">
<xsd:sequence>
 <xsd:element name="Professor" type="xsd:string "/>  
 </xsd:sequence>
 </xsd:extension > 
  </xsd:complexContent>
 </xsd:complexType > 
 <!--restriction data types   8b) -->         
<xsd:complexType name="seminaType">  
 <xsd:complexContent>
<xsd:restriction base="eventType">
<xsd:sequence>
 <xsd:element name="Title" type="xsd:string" minOccurs="0" maxOccurs="0"/>  
 </xsd:sequence>
 </xsd:restriction > 
  </xsd:complexContent>
 </xsd:complexType > 
 <!--restriction data types   8c) -->              
 <xsd:complexType name="labType">  
 <xsd:complexContent>
<xsd:restriction base="eventType">
<xsd:attribute name="Classroom" type="xsd:string" use="prohibited"/>
 </xsd:restriction > 
 </xsd:complexContent>
 </xsd:complexType > 
                     
</xsd:schema>

a tutaj polecenia:
2. Add to the XML schema a new simple type (simpleType) for the element "Day" so that it accepts only the following values: (Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, Sunday)
3. Add to the XML Schema a new simple type (SimpleType) for the element "Time" so that it accepts only string with 11 characters following the pattern «2 digits, semicolon, 2 digit, dash, 2 digits, semicolon, 2 digits» e.g.: «15:30-18:00»
4. Change the XML Schema so that each "Event" to accept more than one but less than six "Lecture" elements.
5. Define in the XML Schema an attribute for the element "Lecture", with name "Classroom" and with type: string with size less than 5 characters. The attribute should be obligatory in all "Lecture" elements.
6. Transfer the Inline declaration of the element type of "Event" so that it becomes global and give to that type the name "eventType"
7. Transfer the declaration of the element "Event" so that it becomes global and use in the "Schedule" element a reference (ref) to that.
8. Create three new types that derive from the type "eventType":

  • The type "lessonType" extends the type "eventType", by adding the additional element "Professor"(string).
  • The type "seminaType" restricts the type "eventType" so that it contains only one "Lecture" element.
  • The type "labType" restricts the type "eventType" so that the elements of this type do not contain the attribute "classroom".
  1. Define globally three elements "Lesson", "Seminar" and "Lab" of type "lessonType" , "seminarType" and "labType" respectively, so that the can be used as (SubstituteGroup) wherever there is a reference to an "Event" element.