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