[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Selecting/matching based on inherited attributes
> 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
|
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
|