Closed Bug 307908 Opened 19 years ago Closed 19 years ago

DTD files with XML file extension not loaded

Categories

(Core :: XML, defect)

x86
Windows XP
defect
Not set
minor

Tracking

()

RESOLVED WORKSFORME

People

(Reporter: matthew, Unassigned)

Details

This is a change between Mozilla Firefox 1.0.6 and 1.5 Beta 1.

Firefox normally won't load DTDs from the Internet, but it will load a DTD with
the same filename from the res/dtd directory of the browser installation.
However, it now seems to fail when the DTD filename ends with ".xml".

(This may sound like a pathological thing to want to do, but I think it's not
against any standards, and it does appear to exist for WML 1.1, see for example
http://www.w3schools.com/wap/wml_tasks.asp .)

This bug prevents extensions from supporting WML 1.1 files which refer to the
.xml DTD.

Sample XML file with DTD ending in ".xml":
<?xml version="1.0" ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
    <card title="Single-card test">
	<p>Simple DTD test</p>
    </card>
</wml>

Result:
Error message is shown:
XML Parsing Error: error in processing external entity reference
Location: file:///C:/Documents%20and%20Settings/admin/Desktop/test-xml.xml
Line Number 2, Column 94:<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
---------------------------------------------------------------------------------------------^

Sample file with DTD file ending in ".dtd":
<?xml version="1.0" ?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1_1.dtd">
<wml>
    <card title="Single-card test">
	<p>Simple DTD test</p>
    </card>
</wml>

Result: WML file is pretty-printed.
Assignee: nobody → xml
Component: General → XML
Product: Firefox → Core
QA Contact: general → ashshbhatt
WFM on trunk/OS X, could you please try if it works for you in a recent nightly?
Doesn't WFM Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9a1)
Gecko/20050910 Firefox/1.6a1.

The test is to load the above test file with the wml_1.1.xml DTD downloaded and
saved into the browser res/dtd subdirectory, so that Firefox tries to load it. I
don't think I made this very clear above. If the DTD is not in res/dtd then
there is no problem.
(In reply to comment #2)
> The test is to load the above test file with the wml_1.1.xml DTD downloaded and
> saved into the browser res/dtd subdirectory, so that Firefox tries to load it.

Yes, that's what I did and it WFM.
Can no longer reproduce in 1.5RC1. Marking FIXED.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
No specific bug / patch referenced as the fix.

-> WORKSFORME
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.