The basic idea behind Tail Recursion is to eliminate the storage of any state information across the recursive steps. All information that would ever be needed at any single step is passed as a parameter to the function instead of being stored at some higher level in the recursion stack. This allows the XSL engine to treat the recursive function as though it were an iterative loop in a procedural language. Tail recursion is a condition where you should strongly question the need to use recursion. Specifically it\'s when the recursive call happens at the very END of the function and nothing occurs afterwards. If this is the case, in languages which do not do this for you automatically -- which are most all of them -- you should consider changing the recursive function into a loop. The reason for this is that function calls are more inefficient and use more resources than loops so the ability to recognize tail recursion and code around it is an important consideration in designing your programs.