Arve and Christian,
Thanks for reminding me of both the subsequence() function and the range operator "$a to $b".
(It's terrible how what is obvious to the brain at one time may be completely forgotten at another time. Maybe the brain in question is getting old and wearing out.)
I will follow your advice and try some experiments, adding these options and watching for the rewrites. As for a bottleneck ... yes there are performance bottlenecks but those are appearing only in the rather large datasets my customer is running. In general I want to see that the code I offer them is as efficient as possible (avoiding known impediments) even before performance testing at scale.
Thanks, Wendell
Wendell Piez | http://www.wendellpiez.com XML | XSLT | electronic publishing Eat Your Vegetables _____oo_________o_o___ooooo____ooooooo_^
On Tue, Aug 13, 2013 at 12:42 PM, Christian Grün christian.gruen@gmail.com wrote:
Hi Wendell,
for $record at $p in $recordSet where ($p ge $start) and ($p ge $end) return $record/process-record(.)
I would usually write this as:
$recordSet[position() = $start to $end]/process-record(.)
…but as the query optimizer rewrites some of the possible alternatives to the same internal representation, it may happen that it doesn’t really matter.
Did you encounter some performance bottlenecks? Christian