|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Unexpected Context Node at Points in XPath Express
> I should look more carefully: the link that my mailprog (thunderbird)
> makes of it does not include the trailing dot (as normally a link
> wouldn't end on any and the dot it part of the sentence). Anyway, I see
> now that the other page *is* different and does contain <h2> tags. And
> now both queries select something (and different things). Sorry for my
> first mistaken interpretation of your queries...
>
> -- Abel Braaksma
>
>
I think I misunderstood what becomes the context node. Take the first
one I mentioned:
id('bodyContent')/h2[1]/following-sibling::*[position()<count(following::p[1]/preceding-sibling::*)
- count(preceding-sibling::*)]
I thought that while the position() filter was running, 'h2[1]' 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?
Regardless, I'm interested to know of any alternate ways to express
the the second query, which gathers the desired results.
- mt
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Cast Your Vote
We need your help – Vote for DataDirect XML Products!
Winners and finalists announced at SOA World Conference in November. Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|







