Use:
when this transformation is performed on any XML document (not used), the wanted result: 1 to 100 is produced.
Do note: This solution is tail-recursive and with many XSLT processors will be optimized so that recursion is eliminated. This means you can use it with $count
set to millions without stack overflow or slow execution.
A non-tail recursive solution, like the one of @0xA3 crashes with stack-overflow (with Saxon 6.5.4) even with count = 1000