This is essentially the same problem as splitting data across the rows of a table for which the canonical solution is at
http://www.dpawson.co.uk/xsl/sect2/N7450.html#d9550e13
Your code doesn't work, of course, because you only output anything if position() mod 10 = 0, which is only true once every 10 items. What you need to do is
if position() mod 10 = 1
<group>
process the items from position() to position()+10 inclusive
</group>
Michael Kay
http://www.saxonica.com/
Author, XSLT Programmer's Reference and XPath 2.0 Programmer's Reference