RE: [xsl] Name of current node's parent?

Subject: RE: [xsl] Name of current node's parent?
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Thu, 4 Jan 2001 10:33:01 -0000
> Hi, I am new to the list and XSL.  In an XSLT stylesheet I am 
> currently
> working on, I want to compare the name of the current note's 
> parent with a
> string using <xsl:if>.

If the name is known statically, use:

<xsl:if test="parent::b">

Otherwise, use

<xsl:if test="name(..)=$variable">

Mike Kay

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


Current Thread