XSL: for-each with max items

While working with Umbraco and Sitecore I learned some Xsl tricks. The following example shows how to show the first 10 items in a HTML list. <ul>   <xsl:for-each select="*">     <xsl:if test="position()&lt;='9'">       <li>  <a href="{@link}">    <xsl:value-of select="@name"/>   </a>       </li>     </xsl:if>   </xsl:for-each> </ul>