[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

RE: [xsl] Selecting/matching based on inherited attributes


Subject: RE: [xsl] Selecting/matching based on inherited attributes
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Fri, 19 Apr 2002 10:28:23 +0100

> eg (knowing this is illegal, but trying to show intent):
> 
> <xsl:apply-templates 
> select="//myelem/[ancestor-or-self::*[@att1][1]/[@att1
> ='d']][ancestor-or-self::*[@att2][1]/[@att2='c']]"/>
> 
> in plain english: apply templates to all "myelem" nodes that have a
> closest-att1 of "d" and a closest-att2 of "c".

select="//myelem[(ancestor-or-self::*/@att1)[last()]='d' and
                 (ancestor-or-self::*/@att2)[last()]='c']"


Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list



Current Thread