Subject: Re: [xsl] Unexpected Context Node at Points in XPath Expression From: Abel Braaksma <abel.online@xxxxxxxxx> Date: Wed, 05 Sep 2007 01:07:57 +0200 |
Cheers, -- Abel Braaksma
Unexpected to me, at least.
I've been familiarizing myself with XPath for a project by browsing around the Internet with the Firefox extension XPath Checker.
On this page:
http://en.wikiquote.org/wiki/A.I.
... I tried the following:
id('bodyContent')/h2/following-sibling::*[position()<count(following-sibling::p[1]/preceding-sibling::*) - count(preceding-sibling::*)]
... which I expected to select the 7 ul elements following the specified h2. The next query DOES do that:
id('bodyContent')/h2[1]/following-sibling::*[position()<count(id('bodyContent')/h2[1]/following-sibling::p[1]/preceding-sibling::*) - count(id('bodyContent')/h2[1]/preceding-sibling::*)]
The stuff I had to add in I had expected was already present as the context node. Why was I wrong?
- mt
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Unexpected Context Node at Po, Michael Terry | Thread | Re: [xsl] Unexpected Context Node a, Abel Braaksma |
Re: [xsl] html as input to xslt, Lou Iorio | Date | Re: [xsl] Unexpected Context Node a, Abel Braaksma |
Month |