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

RE: Testing the name of parent node

Subject: RE: Testing the name of parent node
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Fri, 20 Dec 2002 12:23:28 -0000
xsl if test parent
I think you need

<xsl:if test="not(parent::a)">

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 

> -----Original Message-----
> From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx 
> [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx] On Behalf Of 
> Ragulf Pickaxe
> Sent: 20 December 2002 09:58
> To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Testing the name of parent node
> 
> 
> Hello all,
> 
> I think this is trivial, but I can't seem to find how to do it:
> 
> I am in a node <a...> which can have any number of parents or 
> childs of the 
> same type. I want to know if the node I have in hand is the 
> topmost <a...>.
> 
> If it was the attribute that had value a, I think the 
> solution would be like 
> <xsl:if test="../@attr='a'">
> 
> What do I have instead of @attr when I want to test the nodes 
> name (is this 
> called "basename").
> 
> I tried looking at the name() funktion, but the explanation 
> was not very 
> clear to me (Michael Kay's book, 2nd edition), and I don't 
> know if this is 
> the right track at all.
> 
> I really would appreciate some pointers.
> 
> Thank you
> Ragulf Pickaxe :)
> 
> 
> 
> _________________________________________________________________
> MSN 8: advanced junk mail protection and 3 months FREE*. 
> http://join.msn.com/?page=features/junkmail&xAPID=42&PS=47575&
> PI=7324&DI=7474&SU= 
> http://www.hotmail.msn.com/cgi-bin/getmsg&HL=1216hotmailtaglin
es_advancedjmf_3mf


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


 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.