RE: [xsl] testing relationships between nodes

Subject: RE: [xsl] testing relationships between nodes
From: "Houghton,Andrew" <houghtoa@xxxxxxxx>
Date: Thu, 14 Sep 2006 12:19:27 -0400
> From: Wolfgang Jeltsch [mailto:wolfgang@xxxxxxxxxxx]
> Sent: 14 September, 2006 12:16
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: [xsl] testing relationships between nodes
>
> Hello,
>
> alas, I cannot see any way to check whether a given node is
> an ancestor of a given other node in XPath.  How do I do this?
>

<x>
 <y>
  <z/>
 </y>
</x>

<xsl:if test="exists(/x/y/z/ancestor::x)"/>


Andy,

Current Thread