Closed Bug 237185 Opened 21 years ago Closed 21 years ago

nsXPathNSResolver::LookupNamespaceURI needs to resolve xml

Categories

(Core :: XSLT, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: peterv, Assigned: peterv)

Details

Attachments

(1 file)

Attached patch FixSplinter Review
Attachment #143663 - Flags: superreview?(jst)
Attachment #143663 - Flags: review?(jst)
Comment on attachment 143663 [details] [diff] [review]
Fix

+    if (aPrefix.Equals(NS_LITERAL_STRING("xml"))) {
+	 aResult = NS_LITERAL_STRING("http://www.w3.org/XML/1998/namespace");
+
+	 return NS_OK;
+    }
+
+    if (mNode) {
	 return mNode->LookupNamespaceURI(aPrefix, aResult);
+    }
+
     SetDOMStringToNull(aResult);
+
     return NS_OK;

While you're at it, wanna flip that around to return the real lookup result at
the end of the method and the make the null return be an early return, like the
other exception?

r+sr=jst
Attachment #143663 - Flags: superreview?(jst)
Attachment #143663 - Flags: superreview+
Attachment #143663 - Flags: review?(jst)
Attachment #143663 - Flags: review+
Comment on attachment 143663 [details] [diff] [review]
Fix

Small DOM correctness fix. Makes the xml prefix resolve to the right namespace
URI. This API is not used a lot, very low risk.
Attachment #143663 - Flags: approval1.7b?
Comment on attachment 143663 [details] [diff] [review]
Fix

a=chofmann for 1.7b
Attachment #143663 - Flags: approval1.7b? → approval1.7b+
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.

Attachment

General

Created:
Updated:
Size: