Closed Bug 322570 Opened 20 years ago Closed 20 years ago

Namespaces that are not used don't get registered

Categories

(Core :: XML, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bzbarsky, Assigned: sicking)

References

Details

(Keywords: regression)

Attachments

(2 files)

Since bug 192139, when parsing XML we only call RegisterNamespace from SplitExpatName, so a namespace that's not actually used in the document doesn't get registered with the namespace manager. This causes us to have a bug in lookupPrefix, as far as I can see.
Attached file Testcase
Yeah, this should be fixed in the lookupPrefix implementation
So should ResolvePrefix just call RegisterNamespace on the string you pass in or something? That seems a little suboptimal... In general, it also looks like the namespace manager hashtables could balloon uncontrollably. :(
The entire lookup is unneccesary. It seems like it was originally some sort of optimization to bail early, but it's obviously wrong. Patch comming up.
Attached patch This otta' do itSplinter Review
Assignee: peterv → bugmail
Status: NEW → ASSIGNED
Attachment #207773 - Flags: superreview?(bzbarsky)
Attachment #207773 - Flags: review?
Attachment #207773 - Flags: review? → review?(bzbarsky)
Comment on attachment 207773 [details] [diff] [review] This otta' do it Sure.
Attachment #207773 - Flags: superreview?(bzbarsky)
Attachment #207773 - Flags: superreview+
Attachment #207773 - Flags: review?(bzbarsky)
Attachment #207773 - Flags: review+
Checked in
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: