Closed
Bug 315493
Opened 20 years ago
Closed 20 years ago
SVG doesn't display when embedded in XHTML document if file has a .html extension. Works if document has .xml extension.
Categories
(Firefox :: File Handling, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: scott, Unassigned)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b5) Gecko/20051006 Firefox/1.4.1
I have a compound XHTML document (entire content below) that when opened from a local file named line1.xml it works fine. If the file is renamed to line1.xml.html, it no longer displays the SVG.
The entire file content is below:
<?xml version="1.0"?>
<!DOCTYPE html
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
<p>below is some svg:</p>
<div style="position:absolute;top:100px;left:300px;border:1px solid blue">
<svg xmlns="http://www.w3.org/2000/svg" width="200" height="200">
<g style="stroke: green; height:200">
<line x1="0" y1="0" x2="200" y2="200" style="stroke-width: 5;" />
</g>
</svg>
</div>
<p>above is some svg</p>
</body>
</html>
Reproducible: Always
Steps to Reproduce:
1.Paste the content from the details above into a file name line1.xml.html and save it on your local machine (it was on my desktop).
2.Double click on it to open it in firefox v1.5 beta 2.
3.
Actual Results:
The HTML portions display, but hte SVG is not displayed (the div barely appears as as tiny blue dot.
Expected Results:
The SVG should display. Rename the file to line1.xml and open it and it displayed the results I expected.
Comment 1•20 years ago
|
||
If you send it as text/html (and giving it the .html extension is equivalent to sending it as text/html) then it's HTML, not XML.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
| Reporter | ||
Comment 2•20 years ago
|
||
(In reply to comment #1)
> If you send it as text/html (and giving it the .html extension is equivalent to
> sending it as text/html) then it's HTML, not XML.
>
Ian:
Thanks for your reply. Since Firefox sees this document (even when opened from a .html file) as valid *XHTML* which is necessarily valid XML according to the XHTML specification, it seems that a valid compound document such as this (XHTML+SVG) should be recognized and rendered properly. Afterall, additional XML embedded into an XHTML document is still XHTML. I don't see why firefox would not render it.
Comment 3•20 years ago
|
||
>>>Since Firefox sees this document (even when opened from
a .html file) as valid *XHTML* which is necessarily valid XML according to the
XHTML specification<<<
No, Firefox sees it as an HTML file. There are subtle differences (unsupported XML notations), and some not so subtle (e.g. SVG not working).
You need to log in
before you can comment on or make changes to this bug.
Description
•