|
Subject: Re: Accessing the element stack generically From: "Clark C. Evans" <clark.evans@xxxxxxxxxxxxxxxxxxxx> Date: Fri, 15 Oct 1999 12:43:32 -0400 (EDT) |
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
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| Accessing the element stack generic, Clark C. Evans | Thread | ;) Was: Re: Accessing the element s, Clark C. Evans |
| Accessing the element stack generic, Clark C. Evans | Date | Announce: Fifth Edition of XSLT/XPa, G. Ken Holman |
| Month |