W3C home > Mailing lists > Public > www-xpath-comments@w3.org > July to September 2010

How to select descendent para, but not descendent para of descendent para ?

From: Timothy Madden <terminatorul@gmail.com>
Date: Mon, 02 Aug 2010 13:53:07 +0300
To: www-xpath-comments@w3.org
Message-ID: <i3682k$hd0$1@dough.gmane.org>
Hello

I have a tree of <var> nodes that can include other <var> nodes that can 
include other <var> nodes ...

I would like to allow <var> nodes to also be descendants of their parent 
<var>, not necessarily immediate children, so the XML tree may have more 
levels of nesting than the level of nesting of <var> nodes. The levels 
with nodes other than <var> are simply ignored, and only their <var> 
children are used in my application.

Is there a way to select the first-descendant, that will get me all 
descendant <var> node that have no <var> ancestor other then the context 
node and its ancestors ?

Or to put it another way, is it possible to select descendant <var> 
nodes, but not descendant <var> nodes included in descendant <var> nodes ?

Thank you,
Timothy Madden
Received on Monday, 2 August 2010 11:48:26 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 2 August 2010 11:48:31 GMT