[Home] [By Thread] [By Date] [Recent Entries]

Subject: RE: Node Position & Relationship!
From: "Andrew Welch" <ajwelch@xxxxxxxxxxxxxxx>
Date: Fri, 11 Feb 2005 14:54:48 -0000
I wrote:

> To test if a node has siblings:
>
>   <xsl:if test="preceding-sibling::tree or following-sibling::tree">
>
> Or:
>
>   <xsl:if test="../tree">

Of course the second one will always be true if the current node is a
<tree> node...

It would need to be modified to:

 <xsl:if test="../tree[generate-id(.) != generate-id(current())]">

to ensure the the current <tree> node doesn't get included in the
selection.

Current Thread
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member