title: How to select first node only in xslt
body: <p>My XML provides me with multiple images assigned to different mmids:</p>
  
  <pre><code>&lt;Mediendaten&gt;
      &lt;Mediendaten mmid="22404"&gt;
          &lt;url size="original"&gt;A 22404 FILE&lt;/url&gt;
          &lt;url size="thumb"&gt;ANOTHER 22404 FILE&lt;/url&gt;
      &lt;/Mediendaten&gt;
      &lt;Mediendaten mmid="22405"&gt;
          &lt;url size="original"&gt;A 22405 FILE&lt;/url&gt;
          &lt;url size="thumb"&gt;ANOTHER 22405 FILE&lt;/url&gt;
      &lt;/Mediendaten&gt;
  &lt;Mediendaten&gt;
  </code></pre>
  
  <p>My XSLT selects only the urls where size=thumb:</p>
  
  <pre><code>&lt;xsl:template match="/Mediendaten"&gt;
  &lt;xsl:apply-templates select="Mediendaten/url"&gt;
  &lt;/xsl:apply-templates&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template match="Mediendaten/url"&gt;
  &lt;xsl:if test="@size = 'thumb'"&gt;
  &lt;img width="280" border="0" align="left"&gt;
  &lt;xsl:attribute name="src"&gt;&lt;xsl:value-of select="."/&gt;&lt;/xsl:attribute&gt;
  &lt;/img&gt;
  &lt;/xsl:if&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>HOWEVER, I only need the thumbnail from the first mmid (in this case 22404). I have NO control over the mmid value.</p>
  
  <p>How do I stop my template so it only outputs the thumb file of the first mmid?</p>
  
  <p>Many thanks for any help!</p>