[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XPath for the selected node
I don't know much about xquery, but in XSLT you can do this on any path:
<xsl:value-of select="ancestor-or-self::*/name()" separator="/" /> Or, not tested, the following if you need the depth as well: <xsl:value-of separator="/"> <xsl:for-each select="ancestor-or-self::*"> <xsl:value-of select="name()" /> <xsl:text>[</xsl:text> <xsl:value-of select="count(preceding-sibling::*[name() = current()/name()]" /> <xsl:text>]</xsl:text> </xsl:for-each> </xsl:value-of>
v vijith wrote: Dear All, I have an XML which has the structure like
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|