I have nested xsl:for loops:
Welbog has answered it well - but just to note you appear to be doing a cartesion (cross) join - is that intentional? If you are trying to do a regular join (with a predicate etc), then you want want to look into - i.e. declare a key:
then consume in your predicate:
This should be equivalent to (but much faster than) the predicate:
If you are grouping the data, then look at Muenchian grouping