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


2014-07-26 15:51 GMT+02:00 Sebastian Rahtz <sebastian.rahtz@gmail.com>:



On 26 July 2014 06:42, Michael Kay <mike@saxonica.com> 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

Sebastian

------------------------------------------------------------------------------
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.
http://p.sf.net/sfu/bds
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
saxon-help@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/saxon-help



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