Hi,
Tempore 00:16:15, die Thursday 13 January 2005 AD, hinc in foro {comp.text.xml} scripsit Rolf Kemper <>:
> Imagine I'm on the node <H id=5>
> Then all nets which are above are ancestor::*/M/p/@Net
> The Nets in and below this Level are decendant::*/p/@Net
>
> What I would need is a list of Nets which are in the ancestor nets AND
> in the decendant nets. This nets are exactly the ones we need in the
> interface.
>
> ancestor::/M/p[@Net=descedant::*/p]/@Net does not return any net.
> I feel the approach to have = betwenn to nodesets may be bad.
IMHO, that approach is perfect, in fact the solution is very close.
The following Xpath will return 'ACDA':
ancestor::*/M/p/@net[.=current()/descendant::*/p/@net]
While this Xpath will return exactly 'ACD', your desired output:
ancestor::*/M/p/@net[.=current()/descendant::*/p/@net][not(ancestor::[position() > 3]/M/p/@net=.)]
regards,
--
Joris Gillis (
http://www.ticalc.org/cgi-bin/acct-v...i?userid=38041)
Deserta faciunt et innovationem appelant