In fact I can't think of a single place where it is a good idea to use xsl:for-each, but in software there are very few absolutes and so its possible there might be one or two. By replacing it with xsl:apply-templates you can make your XSLT stylesheet flatter in structure, easier to read, more flexible and more maintainable. To root this in the real world, lets take a small piece of XML that we...