This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Selecting/matching based on inherited attributes
- From: "Michael Kay" <michael dot h dot kay at ntlworld dot com>
- To: <xsl-list at lists dot mulberrytech dot com>
- Date: Fri, 19 Apr 2002 10:28:23 +0100
- Subject: RE: [xsl] Selecting/matching based on inherited attributes
- Reply-to: xsl-list at lists dot mulberrytech dot com
> 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@ntlworld.com
work: Michael.Kay@softwareag.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list