[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Accessing the element stack generically
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
|
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
|