Here's my DTD:
<!DOCTYPE datamain [
<!ELEMENT flight (flight_no,company_name,departs_from,departure_time,destination,arrival_time,flight_status)>
<!ELEMENT datamain ANY>
<!ELEMENT flight_no ANY>
<!ELEMENT company_name ANY>
<!ELEMENT departs_from ANY>
<!ELEMENT departure_time ANY>
<!ELEMENT destination ANY>
<!ELEMENT arrival_time ANY>
<!ELEMENT flight_status ANY>
<!ATTLIST flight_no
plane CDATA #REQUIRED>
<!ENTITY BA "British Airways">
<!ENTITY AL "Air Lingus">
<!ENTITY QA "Quantus">
<!ENTITY VA "Virgin Air">
]>


When I have this in my XML file everything is fine, but if I put the element, attlist and entity objects into an external DTD and call it like this:
<!DOCTYPE datamain SYSTEM "./flight.dtd">
I get the error:
XML Parsing Error: undefined entity
at the first Entity in the XML (&BA;)

Any ideas whats going on here? Also If I add the entities in the XML doc like this:
<!DOCTYPE datamain SYSTEM "./flight.dtd" [
<!ENTITY BA "British Airways">
<!ENTITY AL "Air Lingus">
<!ENTITY QA "Quantus">
<!ENTITY VA "Virgin Air">
]>

It works. But I would like to have the whole DTD in an external file. Thanks in advance for any help!