[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Name of current node's parent?

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

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

   <a>
      <b></b>
      <b><c></c></b>
      <c></c>
   <a>

Instead of using

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

I want to use something like

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

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
mlee@xxxxxxxxxx


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.