| Subject: Re: [xsl] Testing the name of parent node From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Fri, 20 Dec 2002 11:19:15 +0100 | 
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...>.
<xsl:if test="not(ancestor::a)"> no a above me in the tree </xsl:if>
<xsl:if test="not(ancestor::*[name() = 'a'])"> the same here </xsl:if>
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 :)
| Current Thread | 
|---|
| 
 | 
| <- Previous | Index | Next -> | 
|---|---|---|
| [xsl] Testing the name of parent no, Ragulf Pickaxe | Thread | Re: [xsl] Testing the name of paren, David Carlisle | 
| Re: [xsl] Yet Another Entity Ref qu, David Carlisle | Date | Re: [xsl] Testing the name of paren, David Carlisle | 
| Month |