On Fri, 15 Oct 1999, Clark C. Evans wrote:
> I'd like to, when match="c" is invoked, print
> the current element stack. Any generic way to do this?
>
> /a/b/c and /a/c are what I'm after...
Sorry about asking such an easy question! This works
for XT. Question: Is the "order" of ancestor-or-self
specified? XT does it just right... but is it portable?
<xsl:variable name="full-path">
<xsl:for-each select="ancestor-or-self::*">
<xsl:value-of select="concat('/',name())"/>
</xsl:for-each>
</xsl:variable>
On Fri, 15 Oct 1999, Clark C. Evans wrote:
> Harder version:
>
> <a><b x="y"><c/></b><b x="z"><c/></b></a>
>
> Print the element stack including parameters to get:
>
> /a/b[@x='y']/c and /a/b[@x='z']/c
I'm still working on this one....
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|