Re: [xsl] Check if current node have child with specific attribute

Subject: Re: [xsl] Check if current node have child with specific attribute
From: "Aron Bock" <aronbock@xxxxxxxxxxx>
Date: Thu, 23 Jun 2005 13:29:03 +0000
> > How can I check if the current node have a child with a specific attribute?
> <xsl:if test="*/@specific">
> there is a child with an attribute with name specific
> </xsl:if


Great. To get any grandchild I did it like this:

<xsl:if test="*//@this='true'">

That actually looks for a descendent at any depth; to check a grandchild, i.e. 2 levels down, you really want test="*/*/@this"


--A

_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/


Current Thread