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

RE: How to find out the context of the current node?

Subject: RE: How to find out the context of the current node?
From: Jarno.Elovirta@xxxxxxxxx
Date: Thu, 29 Nov 2001 12:31:50 +0200
RE:  How to find out the context of the current node?
> See XML example. When I match an actual medication in my XSLT
> script I want to perform a different action than when I find 
> a history 
> medication. So somehow I need to be able to know what the context
> of the medication node is. In other words, when I've matched 
> a medication
> node I want to say something like:
> if actual medication
> 	do something
> else
> 	do something else
> I know that I can use the xsl:if or xml:choose statement for 
> this. What I 
> don't know is how to find out in what context I am.

<xsl:choose>
  <xsl:when test="parent::Actual">
    do something
  </xsl:when>
  <xsl:otherwise>
    do something else
  <xsl:otherwise>
</xsl:choose>

J

 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.