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/06 13:19:40 UTC

default namespace node

Hi there,

I've encountered a behaviour of Xalan-J that seems to derivate a little
from the XPath spec, section 5.4. According to the spec, the local part
of a namespace node for the default namespace should be empty. However,
Xalan returns "xmlns" when using the local-name() function on this node.

Xalan Version: 1.0.1

Documents to reproduce behaviour:

<?xml version="1.0"?>
<a xmlns="test"
 xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance"
 xsi:schemaLocation="test test.xsd"
>
    <elem>hello</elem>
</a>

-----

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:tst="test"
>
    <xsl:template match="/tst:a">
        <xsl:message>
            <xsl:value-of select="local-name(namespace::*
               
[string()='http://www.w3.org/1999/XMLSchema-instance'])"/>
        </xsl:message>
        <xsl:message>
            <xsl:value-of select="local-name(namespace::*
                [string()='test'])"/>
        </xsl:message>
    </xsl:template>
</xsl:stylesheet>

Output:
xsi
xmlns

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