<xsl:variable name="pathVariable">
<xsl:for-each select="ancestor-or-self::*">
<xsl:if test="name() != 'root'">
<xsl:element name="dummy"><xsl:value-of select="name()"/></xsl:element>
<xsl:if test="not(position()=last())">
<xsl:element name="dummy">/</xsl:element>
</xsl:if>
</xsl:if>
</xsl:for-each>
</xsl:variable>
<!-- a 100 places throughout the document -->
<xsl:attribute name="path">
<xsl:value-of select="$pathVariable/text()"/>
</xsl:attribute>
xixxix
2009-09-30 06:49:54