[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

Subject: Re: Unexpected Context Node at Points in XPath Expression
From: "Michael Terry" <formido@xxxxxxxxx>
Date: Tue, 4 Sep 2007 16:31:27 -0700
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

Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.