Closed
Bug 313576
Opened 19 years ago
Closed 19 years ago
svg image is displayed as plain xml when svg namespace attribute is not present in svg data
Categories
(Core :: SVG, defect)
Tracking
()
RESOLVED
DUPLICATE
of bug 307813
People
(Reporter: pavel.vrecion, Unassigned)
Details
Attachments
(2 files)
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b4) Gecko/20050908 Firefox/1.4 Xml document with correct svg image content type (image/svg+xml) is displayed as svg vector image only when svg root element has namespace attribute set: xmlns="http://www.w3.org/2000/svg" If this attribute is ommited, then Firefox 1.5 Beta 2 displays it as a plain XML MS IE or any Firefox 1.x with adobe svgviewer plugin displays in both cases rendered image. Opera 8.5 also displays it correctly as an image. For example: <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="300" height="300" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:1; stroke:rgb(0,0,0)"/> </svg> is displayed correctly as an image (filled rectangle) <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="300" height="300" version="1.1"> <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:1; stroke:rgb(0,0,0)"/> </svg> is displayed as xml document (although content type is correctly recognized as image/svg+xml) Reproducible: Always Steps to Reproduce: 1. Create svg file (for example rect.svg) with content <?xml version="1.0" standalone="no"?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"> <svg width="300" height="300" version="1.1" xmlns="http://www.w3.org/2000/svg"> <rect width="300" height="100" style="fill:rgb(0,0,255);stroke-width:1; stroke:rgb(0,0,0)"/> </svg> 2. In Firefox 1.5 open it as a file, or place it to some web server 3. Actual Results: Source XML document is displayed. (incorrect) Content type is recognized as image/svg+xml. (correct0 Expected Results: Rendered svg image (for example filled rectangle) It seems that svg is recognized from presence of xmlns="http://www.w3.org/2000/svg". IMHO content type should be used instead (or in combination). It seems that Adobe Svg Viewer plugins and Opera 8.5 use content type, while they display the same result regardles of xmlns attribute presence.
Reporter | ||
Comment 1•19 years ago
|
||
Reporter | ||
Comment 2•19 years ago
|
||
Comment 3•19 years ago
|
||
This is an SVG problem, Core->SVG It is also a duplicate of bug #307813
Comment 4•19 years ago
|
||
*** This bug has been marked as a duplicate of 307813 ***
Status: UNCONFIRMED → RESOLVED
Closed: 19 years ago
Component: General → SVG
Product: Firefox → Core
Resolution: --- → DUPLICATE
Version: unspecified → 1.8 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•