tags:

views:

382

answers:

1

Hello, I have an XML file (diploma.xml) that looks like this:

<?xml version="1.0" standalone="no" ?>
<!DOCTYPE Diploma SYSTEM "diploma.dtd">
<Diploma>
 &students;
 &Registrations;
 &Courses;
</Diploma>

And the DTD looks like this:

<!ENTITY students SYSTEM "students.xml">
<!ENTITY Registrations SYSTEM "registrations.xml">
<!ENTITY Courses SYSTEM "courses.xml">

When I try to open diploma.xml in IE8 it properly includes all the other XML files, but in Firefox 3.5 I get a syntax error about &students; not being defined. Why is this?

+3  A: 

Firefox does not read external entities at all (except in a few internal special cases). This is partially because it would be likely to flood sites like W3 with DTD requests, partly because it's another source of potential cross-site scripting, but mostly due to laziness, because few people use Firefox as a raw XML viewer, and few of those people use old-school DTD any more.

bobince
Excellent answer. Thanks!
Mark