This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Re: How to find out the context of the current node?
- From: Jörg Heinicke <joerg dot heinicke at gmx dot de>
- To: xsl-list at lists dot mulberrytech dot com
- Date: Thu, 29 Nov 2001 13:17:42 +0100
- Subject: Re: [xsl] How to find out the context of the current node?
- References: <21AA80DAD9DAD311AC51009027B245EC34A1FF@OVSNT5>
- Reply-to: xsl-list at lists dot mulberrytech dot com
Either two templates matching 'Actual/Medication' or 'History/Medication'
or asking for parent::Actual or parent::History.
Joerg
Marco Hoendervangers wrote:
> Hi all,
>
> 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.
>
> Can anybode help me with this one?
>
> Thanks.
> Marco
>
> (XML example)
> <Actual>
> <Medication>
> <Amount>100cl</Amount>
> <Usage>xxxxxx</Usage>
> </Medication>
> </Actual>
> <History>
> <Medication>
> <Amount>200cl</Amount>
> <Usage>zzzzzzzzzz</Usage>
> </Medication>
> </History>
--
System Development
VIRBUS AG
Fon +49(0)341-979-7411
Fax +49(0)341-979-7409
joerg.heinicke@virbus.de
www.virbus.de
News:
Cocoon-Premiere - Virbus AG setzt bei ShoppingMall-Plattform "Lofex"
auf neueste XML-basierende Technologie
http://www.virbus.de/de/press/pressemitteilung/20011123_lofex/index.html
http://www.lofex.de
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list