Below is XML that has dtd schema, but it doesn't validate, why? I checked it in Eclipse and http://www.xmlvalidation.com/index.php?id=1&L=0:
<?xml version="1.0"?>
<!DOCTYPE person-list [
<!ELEMENT person-list (person*)>
<!ELEMENT person (first-name,second-name?,last-name,index-no,birth-date)>
<!ELEMENT first-name (#PCDATA)>
<!ELEMENT second-name (#PCDATA)>
<!ELEMENT last-name (#PCDATA)>
<!ELEMENT index-no (#PCDATA)>
<!ELEMENT birth-date (#PCDATA)>
<!ATTLIST person id ID #REQUIRED>
]>
<person-list>
<person id="1">
<first-name>ds</first-name>
<second-name>asd</second-name>
<last-name>asd</last-name>
<index-no>34</index-no>
<birth-date>1915-01-01</birth-date>
</person>
<person id="2">
<first-name>dfswsf</first-name>
<last-name>sdfsdf</last-name>
<index-no>23</index-no>
<birth-date>1916-02-02</birth-date>
</person>
</person-list>