[xsl] Name of current node's parent?

Subject: [xsl] Name of current node's parent?
From: "Michael Lee" <mlee@xxxxxxxxxx>
Date: Thu, 4 Jan 2001 09:21:26 +0800
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>.

Let's say this is a fragment of an XML document:


Instead of using

   <xsl:template match="b/c">

I want to use something like

   <xsl:template match="c">
      <xsl:if test="boolean-expression"></xsl:if>

To check and see if the parent of <c> is <b> or not.  However, I am not very
familiar with XPath expressions and have no idea now to write the boolean
expression inside <xsl:if>.

Can someone help me?

Michael Lee

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

Current Thread