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

VERIFIED FIXED in mozilla0.9.6

Status

()

Core
XSLT
P3
normal
VERIFIED FIXED
17 years ago
17 years ago

People

(Reporter: Oleg Tkachenko, Assigned: Axel Hecht)

Tracking

Trunk
mozilla0.9.6
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Reporter)

Description

17 years ago
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
(Assignee)

Comment 1

17 years ago
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
(Assignee)

Comment 2

17 years ago
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
(Assignee)

Comment 3

17 years ago
this bug was fixed with 7670
Status: NEW → RESOLVED
Last Resolved: 17 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.