This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Keeping track of parents


> 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:choose>
   <xsl:when test="ancestor::somenode">
     <xsl:value-of select="ancestor::somenode[1]/@group_id"/>
   </xsl:when>
   <xsl:otherwise>0</...

Mike Kay
Software AG

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]