The <xsl:for-each> element establishes the context for iteration. The XSLT transformation instructions within the for-each loop are applied to each of the nodes selected by the select attribute of the <xsl:for-each> element. Each source element selected by <xsl:for-each> becomes a new context against which operations declared within the <xsl:for-each> are performed.
<xsl:for-each select="//book">
<tr>
<td>
<xsl:value-of select="author"/>
</td>
<td>
<xsl:value-of select="title"/>
</td>
</tr>
</xsl:for-each>