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: Name of current node's parent?


> 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


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