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>

  

    &lt;xsl:if test=&quot;position()

      <li>

 <a href="{@link}">

   

  </a>

      </li>

    

  

</ul>