Error validating DTD

itpages

New Member
I'm trying to write a DTD for an XML file.Here it is : https://prod-c2g.s3.amazonaws.com/db/Winter2013/files/courses-noID.xmlHere's my DTD \[code\] <!ELEMENT Course_Catalog (Department*) ><!ELEMENT Department (Title*, Chair*, Course*) ><!ATTLIST Department Code CDATA #REQUIRED ><!ELEMENT Title ANY ><!ELEMENT Chair (Professor) ><!ELEMENT Professor (First_Name, Middle_Initial?, Last_Name) ><!ELEMENT First_Name ANY ><!ELEMENT Last_Name ANY ><!ELEMENT Course (Title, Description?, Instructors, Prerequisites?) ><!ATTLIST Course Number CDATA #REQUIRED Enrollment CDATA #IMPLIED ><!ELEMENT Description ANY ><!ELEMENT Instructors (Professor*, Lecturer?) ><!ELEMENT Lecturer (First_Name, Middle_Initial?, Last_Name) ><!ELEMENT Middle_Initial ANY ><!ELEMENT Prerequisites (Prereq*)><!ELEMENT Prereq ANY >\[/code\]Well it looks almost fine but there is a slight error.It says 'validity error : Element Instructors content does not follow the DTD, expecting (Professor* , Lecturer?), got (Lecturer Professor Professor )'.Isn't * means any number of elements?Why is there an error?
 
Back
Top