Subject: Re: [xsl] Unexpected Context Node at Points in XPath Expression|
From: Abel Braaksma <abel.online@xxxxxxxxx>
Date: Wed, 05 Sep 2007 01:59:57 +0200
I think I misunderstood what becomes the context node. Take the first one I mentioned:
id('bodyContent')/h2/following-sibling::*[position()<count(following::p/preceding-sibling::*) - count(preceding-sibling::*)]
I thought that while the position() filter was running, 'h2' would be the context node. Instead, it seems the result of 'following-sibling::*' is the context node? What, does it change the context node to each item in that set as it applies the filter? I don't suppose there's a way to refer to the previous context node in a relative way, is there?
following has context node * for position() a/b/c/*[position() = 2]
following has context node c for position() a/b/c[position() = 2]/*