RE: [xsl] Keeping track of parents

Subject: RE: [xsl] Keeping track of parents
From: "Michael Kay" <mhkay@xxxxxxxxxxxx>
Date: Fri, 13 Jul 2001 16:17:48 +0100
> Most of it I can generate, but how can I fill the parentid? 
> If there is no
> ancestor-element named <somenode> then the parent_id should 
> be 0, else the
> parent_id should be the group_id of the ancestor.

<xsl:attribute name="parent_id">
   <xsl:when test="ancestor::somenode">
     <xsl:value-of select="ancestor::somenode[1]/@group_id"/>

Mike Kay
Software AG

 XSL-List info and archive:

Current Thread