Subject: Re: [xsl] Unexpected Context Node at Points in XPath Expression From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Wed, 05 Sep 2007 02:34:48 +0200 |
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?
div/h2[1]/following-sibling::ul [following-sibling::p[1] is ../h2[1]/following-sibling::p[1]]
Cheers, -- Abel Braaksma
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Unexpected Context Node a, Michael Terry | Thread | Re: [xsl] Unexpected Context Node a, Michael Terry |
Re: [xsl] Unexpected Context Node a, Michael Terry | Date | Re: [xsl] Unexpected Context Node a, Michael Terry |
Month |