Closed Bug 92634 Opened 23 years ago Closed 23 years ago

namespace-uri() function returns namespace prefix instead of namespace URI

Categories

(Core :: XSLT, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.6

People

(Reporter: ost, Assigned: axel)

References

Details

xml: <?xml version="1.0"?> <?xml-stylesheet type="text/xsl" href="style.xsl"?> <nsprefix:root xmlns:nsprefix="Namespace URI">4563.84</nsprefix:root> xsl: <?xml version="1.0" ?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:nsprefix="Namespace URI"> <xsl:template match="/nsprefix:root"> <xsl:value-of select="namespace-uri()"/> </xsl:template> </xsl:stylesheet> moz 0.9.2 result: nsprefix saxon's result: Namespace URI XPath spec says: The namespace-uri function returns the namespace URI of the expanded-name of the node in the argument node-set that is first in document order. If the argument node-set is empty, the first node has no expanded-name, or the namespace URI of the expanded-name is null, an empty string is returned. If the argument is omitted, it defaults to a node-set with the context node as its only member. I believe this bug is in NodeSetFunctionCall.cpp file: 191 case NAMESPACE_URI : 192 XMLUtils::getNameSpace(node->getNodeName(),name); But getNameSpace function returns namespace prefix by simple substring before ":" instead of resolving the prefix.
Status: UNCONFIRMED → NEW
Ever confirmed: true
This code calls into XMLUtils::getNameSpace, which is a really funny piece of code. not. We should partially fix this by more love on bug 76070. Axel
Depends on: 76070
this patch is mine, and part of my work in bug 76070.
Assignee: kvisco → axel
OS: Windows 2000 → All
Priority: -- → P3
Hardware: PC → All
Target Milestone: --- → mozilla0.9.6
this bug was fixed with 7670
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
works fine now. verifying
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.