Re: [xsl] Full path to a node

Subject: Re: [xsl] Full path to a node
From: Oleg Tkachenko <olegt@xxxxxxxxxxxxx>
Date: Mon, 10 Feb 2003 09:36:56 +0200
Ronny Haryanto wrote:

Is it possible to print out the full path of a node with XSL?

When I view the "Register A Project" page in the web application I
want to print out:

Home :: Manage :: Project :: Register

at the top of the page.

You can use ancestor-or-self axis to get full list of ancestors including self, then iterate through the list and output labels:

            <xsl:for-each select="ancestor-or-self::*/@label">
                <xsl:value-of select="."/>
                <xsl:if test="position() != last()">
                    <xsl:text> :: </xsl:text>

See also faq about getting pathes to a node:

Oleg Tkachenko
Multiconn Technologies, Israel

XSL-List info and archive:

Current Thread