Подправить Dtd

nyangassist

New member
23.06.2014
1
0
#1
xml лежит
Для просмотра контента необходимо: Войти или зарегистрироваться

Пишу DTD:
Код:
<!ELEMENT Course_Catalog (Department*)>
<!ELEMENT Department (Title, Course+, (Professor|Lecturer)*)>
<!ATTLIST Department Code CDATA #REQUIRED Chair IDREFS #REQUIRED>
<!ELEMENT Title (#PCDATA)>
<!ELEMENT Course (Title, Description?)>
<!ATTLIST Course Number ID #REQUIRED Prerequisites CDATA #IMPLIED Instructors IDREFS #REQUIRED Enrollment CDATA #IMPLIED>
<!ELEMENT Description (CDATA|Courseref)*>
<!ELEMENT Courseref EMPTY>
<!ATTLIST Courseref Number IDREFS #REQUIRED>
<!ELEMENT Lecturer (First_Name, Middle_Initial?, Last_Name)>
<!ATTLIST Lecturer InstrID ID #REQUIRED>
<!ELEMENT Professor (First_Name, Middle_Initial?, Last_Name)>
<!ATTLIST Professor InstrID ID #REQUIRED>
<!ELEMENT First_Name (#PCDATA)>
<!ELEMENT Middle_Initial (#PCDATA)>
<!ELEMENT Last_Name (#PCDATA)>
И получаю ошибки вроде:
/home/sandbox/courses-ID.xml:117: element Description: validity error : Element Description content does not follow the DTD, expecting (CDATA | Courseref)*, got (CDATA)
/home/sandbox/courses-ID.xml:150: element Description: validity error : Element Description content does not follow the DTD, expecting (CDATA | Courseref)*, got (CDATA Courseref CDATA)

Помогите пожалуйста исправить ошибку. Удивляюсь, что
Код:
<!ELEMENT Department (Title, Course+, (Professor|Lecturer)*)>
срабатывает, а
Код:
<!ELEMENT Description (CDATA|Courseref)*>
нет