Re: [xsl] Testing using XPath

Subject: Re: [xsl] Testing using XPath
From: Jeni Tennison <mail@xxxxxxxxxxxxxxxx>
Date: Thu, 6 Sep 2001 14:55:29 +0100
Hi Stuart,

> How can I test from with the current node as element2, whether its parent's
> following-sibling[1] is element3?

When you test a node set then if there are any nodes in the node set
it returns true; if it's empty it returns false. The easiest test is
one that tries to select the immediately following sibling of the
current element's parent, but only if it's an element3 element.

Go to the parent with ..
Go to its immediately following sibling element with
Only select it if it's an element3 element with the predicate

Steps are separated by /s and predicates are placed at the end of the
step. So the path is:


I hope that helps,


Jeni Tennison

 XSL-List info and archive:

Current Thread