xsl-list
[Top] [All Lists]

Re: [xsl] testing relationships between nodes

2006-09-14 09:26:13
Am Donnerstag, 14. September 2006 18:19 schrieb Houghton,Andrew:
From: Wolfgang Jeltsch [mailto:wolfgang(_at_)jeltsch(_dot_)net]
Sent: 14 September, 2006 12:16
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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,

I meant concrete nodes, not classes of nodes (like all nodes with a certain 
QName).  I have a template with a parameter representing a concrete node.  I 
want to check whether this node is a descendant of the current node.

Best wishes,
Wolfgang

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--