Re: [xsl] Xpath and Ranges

Subject: Re: [xsl] Xpath and Ranges
From: David Carlisle <davidc@xxxxxxxxx>
Date: Wed, 2 Aug 2006 17:53:08 +0100
[reposting my answer on this list, from xpath-comments]

in xpath2

/chapter/(title[1]/(.,following-sibling::node()) except title[2]/(.,following-sibling::node())

is probably the most literal translation into xpath, but others are
possible eg

for $end in /chapter/title[2]
return
/chapter/(title[1]/(.,following-sibling::node()[. <<  $end],$end)

In XPath1 it's probably hard to do but in xpath1+xslt1 (so you can define
variables) then again it's possible.

David

Current Thread