Re: [xsl] Selecting all ancestors

Subject: Re: [xsl] Selecting all ancestors
From: "J.Pietschmann" <j3322ptm@xxxxxxxx>
Date: Tue, 15 Oct 2002 22:40:32 +0200
Juan 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 have
different 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



Current Thread