Closed
Bug 287244
Opened 21 years ago
Closed 21 years ago
DOCTYPE should not imply a default namespace
Categories
(Core :: SVG, defect)
Core
SVG
Tracking
()
RESOLVED
FIXED
People
(Reporter: annevk, Assigned: annevk)
Details
(Keywords: testcase)
Attachments
(3 files)
|
203 bytes,
image/svg+xml
|
Details | |
|
1.42 KB,
patch
|
tor
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
|
3.22 KB,
patch
|
tor
:
review+
bzbarsky
:
superreview+
|
Details | Diff | Splinter Review |
For at least one DOCTYPE SVG implies a default namespace for the document, which
is incorrect, since even if that DTD defined some default namespace, we are not
a validating parser.
jwatt pointed out that the only place in the source code where that DOCTYPE is
specified is here:
<http://lxr.mozilla.org/seamonkey/source/parser/htmlparser/src/nsExpatDriver.cpp#229>
| Assignee | ||
Comment 1•21 years ago
|
||
| Assignee | ||
Comment 2•21 years ago
|
||
I did some digging and found:
<https://bugzilla.mozilla.org/show_bug.cgi?id=145810#c3>
<https://bugzilla.mozilla.org/show_bug.cgi?id=113400>
I suggest that we remove that DOCTYPE and svg.dtd:
<http://lxr.mozilla.org/seamonkey/source/layout/svg/base/src/svg.dtd>
| Assignee | ||
Comment 3•21 years ago
|
||
This would fix the bug. I think svg.dtd can be removed as well after this
change.
Attachment #178789 -
Flags: superreview?(bzbarsky)
Attachment #178789 -
Flags: review+
Comment 4•21 years ago
|
||
Bradley, does this patch seem reasonable to you?
| Assignee | ||
Comment 5•21 years ago
|
||
If the file removed, this should change too:
<http://lxr.mozilla.org/seamonkey/source/layout/svg/base/src/Makefile.in#110>
Comment 6•21 years ago
|
||
Does the SVG testsuite wor with this? The initial SVG spec required that we
magically imply the xmlns, but since we're not a validating parser, we didn't.
That did get changed, but I'm not sure whast out there wihtout the appropriate
namespace on the <svg>.
Comment 7•21 years ago
|
||
(In reply to comment #6)
> Does the SVG testsuite wor with this? The initial SVG spec required that we
> magically imply the xmlns, but since we're not a validating parser, we didn't.
> That did get changed, but I'm not sure whast out there wihtout the appropriate
> namespace on the <svg>.
An old version of the DTD, published in an ancient draft, defaulted the xmlns. The spec didn't require
that it be magically defaulted, that only worked in (at least partially) validating parsers. For purposes of
SVG processing I would recommend to completely ignore the DOCTYPE (except the internal subset of
course). There will be no DOCTYPE for 1.2, it is completely deprecated.
| Assignee | ||
Comment 8•21 years ago
|
||
Note also that we only do this for an ancient DTD that should not be used anyway.
Comment 9•21 years ago
|
||
Comment on attachment 178789 [details] [diff] [review]
patch
sr=bzbarsky, though if that makes svg.dtd unused I'd like to see a followup
patch removing references to it and removing the file....
Attachment #178789 -
Flags: superreview?(bzbarsky) → superreview+
| Assignee | ||
Comment 10•21 years ago
|
||
So who needs to review this?
| Assignee | ||
Updated•21 years ago
|
Attachment #179490 -
Flags: superreview?(bzbarsky)
Attachment #179490 -
Flags: review?(tor)
Updated•21 years ago
|
Attachment #179490 -
Flags: superreview?(bzbarsky) → superreview+
Attachment #179490 -
Flags: review?(tor) → review+
| Assignee | ||
Updated•21 years ago
|
Assignee: general → bug
| Assignee | ||
Comment 11•21 years ago
|
||
Both patches have been checked in by timeless. Marking FIXED.
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•