<!--- Match toes element. ---> <xsl:template match="toes"> <!--- Loop over each toe. ---> <xsl:for-each select="toe"> <!--- Output name of the context toe. ---> [<xsl:value-of select="name/text()" />] </xsl:for-each> </xsl:template>