When using XML
<x:html xmlns:x="http://www.w3.org/1999/xhtml"/>
style sheet
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output indent="yes"/> <xsl:template match="*"> <local-name><xsl:value-of select="local-name()"/></local-name> <name><xsl:value-of select="name()"/></name> </xsl:template> </xsl:stylesheet>
exits
<local-name>html</local-name> <name>x:html</name>
Thus, the result of local-name() does not have a prefix, the result of the name() may contain a prefix.
In your example with a default namespace declaration, the prefix is ββmissing, so name() and local-name() give the same result.
Martin Honnen Mar 17 '10 at 18:36 2010-03-17 18:36
source share