Re: Selecting all ancestors2002-10-15 13:40:32Juan Carlos Gonzalez wrote: Hi: Based on the following tree, I want to select all the parents for an specific catid. I.e for catid="3" I should select id's 1 and 2. This tree coul havedifferent levels. Use the ancestor axis: http://www.w3.org/TR/xpath#axes Something like <xsl:template match="cat[id=3]"> <!-- or whatever --> <xsl:apply-templates select="ancestor::*"/> ... J.Pietschmann XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
|