So   group-starting-with="(position() mod 100000) = 0" should work too?

2014-07-26 15:51 GMT+02:00 Sebastian Rahtz <>:

On 26 July 2014 06:42, Michael Kay <> wrote:
Should have noticed this earlier – sorry!
The cost of evaluating the match pattern *[position()....] is going to be very high, since it depends on counting siblings. In fact, positional patterns like this are evaluated really crudely, by looking at all the children and evaluating the predicate for each one. You should be much better off with a test that looks at position in the population, rather than position among the siblings: try
group-adjacent = “position() idiv 100000”

Golly, thanks!  That goes like a knife through butter. Problem solved.

where Dimitre shows the same answer


Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
saxon-help mailing list archived at

Envoyé depuis Firefox et analysé grâce à Hadoop par la NSA (via Gmail©®™) 😏