Closed
Bug 246604
Opened 20 years ago
Closed 19 years ago
lookupNamespaceURI should probably be aware of xml prefix
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: WeirdAl, Assigned: WeirdAl)
References
()
Details
Attachments
(1 file)
1.29 KB,
patch
|
peterv
:
review+
peterv
:
superreview+
|
Details | Diff | Splinter Review |
The xml attribute prefix (for example, xml:lang) is fairly well-known, but Mozilla's lookupNamespaceURI method doesn't know about it. Thus, to call aNode.lookupNamespaceURI("xml") would require that we explicitly declare the XML namespace. We have a similar problem with aNode.lookupNamespaceURI("xmlns"). These are namespaces that are not going to change, and our DOM code shouldn't have to walk up the tree of nodes to find the right values... :)
Comment 1•20 years ago
|
||
This is a performance enhancement, right? Since "xmlns" and "xml" don't have associated namespace URIs (due to the fact that they are not actually namespaces)....
Comment 2•20 years ago
|
||
They do have associated namespace URIs. xml http://www.w3.org/XML/1998/namespace xmlns http://www.w3.org/2000/xmlns/ See: http://www.w3.org/TR/xml-names11/#xmlReserved
Comment 3•20 years ago
|
||
Note that the lookup algorithm is specified in http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/namespaces-algorithms.html#lookupNamespaceURIAlgo That said, I never understood why that doesn't special-case xml and xmlns. DOM Level 3 XPath ended up special-casing xml: http://www.w3.org/TR/2004/NOTE-DOM-Level-3-XPath-20040226/xpath.html#XPathEvaluator-createNSResolver
Assignee | ||
Comment 4•19 years ago
|
||
javascript:alert(document.lookupNamespaceURI("xml") + "\n" + document.lookupNamespaceURI("xmlns"))
Assignee: general → ajvincent
Status: NEW → ASSIGNED
Attachment #199716 -
Flags: superreview?(peterv)
Attachment #199716 -
Flags: review?(peterv)
Updated•19 years ago
|
Attachment #199716 -
Flags: superreview?(peterv)
Attachment #199716 -
Flags: superreview+
Attachment #199716 -
Flags: review?(peterv)
Attachment #199716 -
Flags: review+
Assignee | ||
Comment 5•19 years ago
|
||
fixed with checkin by timeless
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•