[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Accessing the element stack generically

Subject: Re: Accessing the element stack generically
From: "Clark C. Evans" <clark.evans@xxxxxxxxxxxxxxxxxxxx>
Date: Fri, 15 Oct 1999 12:43:32 -0400 (EDT)
clark evans
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.