yikes! - looks like the simplest way is to have:
<xsl:value-of select="name()" /><xsl:text>/</xsl:text>
<xsl:value-of select="." />
That won't work if you want to generate a path that's independent of the
namespace context. If you want the path expression to be
context-independent then you need to generate steps of the form
*[local-name()='x' and namespace-uri()='y']
Also, the code above generates a path such as a/b/c/d which will select
many elements, whereas you probably want one that selects a single
element such as a/b/c/d. But in this case the "tumbler"
path of the form */*/* is simpler, and avoids namespace
As you see, there are multiple solutions to this requirement - which is
because there are actually a number of different requirements. This is
why there is no standard function.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list