You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Andreas Junghans <an...@isb-ka.de> on 2000/07/03 10:37:04 UTC

namespace axis

Hi there,

thanks for your great job you're doing on Xalan. It's really nice to
work with.

I'm writing to request a known bug to be fixed. The release notes of
Xalan-J 1.1.D01 state the following:

> The namespace::* axis only selects namespaces that were declared locally on the context node. Inherited namespaces are in effect; the only known flaw is the lack of their presence on this rarely-used axis. The name() function, when applied to a namespace node, returns a string that disagrees with other processors, and the XPath spec is vague on this point.

Currently I'm working on stylesheets that process XML Schema documents.
In some cases (e.g. the 'base' attribute of schema types), a namespace
prefix is present in an attribute value. My problem is that I need to
find out the namespace URI for that prefix. Unfortunately, the following
doesn't work if the namespace isn't declared in the current node (as
said in the release notes):

<xsl:value-of select="namespace::*[local-name()=$some-variable]"/>

As a workaroung I'm using:

<xsl:value-of
select="ancestor-or-self::node()/namespace::*[local-name()=$some-variable]"/>

Unfortunately, this seems to give me the URI of the outermost namespace
declaration with the prefix $some-variable, while the innermost is what
I would like to get. I would be very grateful if you could fix this bug
despite the rare use of the namespace axis.

Best regards

  Andreas Junghans

-- 
ISB GmbH                  Phone ++49 721 82800-40 or -0
Karlstraße 52-54          Fax   ++49 721 82800-82
76133 Karlsruhe           mailto:andreas.junghans@isb-ka.de
Germany                   http://www.isb-ka.de