Validating against schema: Employee.xsd
Error: Element 'Phone': The attribute 'Type' is not allowed. on line 9
Line
1 <?xml version="1.0"?>
2 <?xml-stylesheet href="http://courses.oreillyschool.com/introxml/xsl/PhoneBook.xsl" type="text/xsl"?>
3 <!DOCTYPE Employees>
4 <Employees xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="Employee.xsd">
5 <Employee>
6 <First>John</First>
7 <Last>Smith</Last>
8 <Phone Type="Home">1-800-123-4567</Phone>
9 <Birthday>1960-05-25</Birthday>
10 <HourlyRate>35.85</HourlyRate>
11 </Employee>
12 </Employees>
13
Above is the error i get I have tried to fig this out for hours now i cant find a solution.
Here is my .xsd file. Thank you for your help.
<?xml version="1.0"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="Employees" type="EmployeesType"/>
<xs:complexType name="EmployeesType">
<xs:sequence>
<xs:element minOccurs="0" maxOccurs="unbounded" name="Employee" type="EmployeeType"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="EmployeeType">
<xs:sequence>
<xs:element minOccurs="1" maxOccurs="1" name="First" type="xs:token"/>
<xs:element minOccurs="1" maxOccurs="1" name="Last" type="xs:token"/>
<xs:element minOccurs="1" maxOccurs="1" name="Phone" type="xs:token"/>
<xs:element minOccurs="0" maxOccurs="1" name="Birthday" type="xs:date"/>
<xs:element minOccurs="0" maxOccurs="1" name="HourlyRate" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
</xs:schema>