I was wondering if it would be possible to change the current XPath, a single time. For example, <xsl:for-each select="___"> changes the XPath such that each item is effectively treated as the root. I was wondering if there was a way to do this once.My goal was to be able to print the current "path" a node is in. Say the above function is called like "with"... something like the following:
<xsl:template name="qname"> <xsl:with select="../"> <xsl:call-template name="qname"/> </xsl:with> <xsl:text>/</xsl:text><xsl:value-of select="@name"></xsl:template>
Which ideally, when called, in the below xml file...
<element name="a"> <element name="b"> </element> <element name="c"> <element name="d"> </element> </element></element>
When called from the element who's name is "d", would output:a/c/dAnyways, does anybody have any idea how to do either of these problems??