title: Custom xsl rendering for lookup field in list view (SharePoint 2010)
body: <p>I'm trying to change rendering of a list column on list view page.</p>
  
  <p>After a few tutorials and some hair pulling I managed to create an xslt for a calculated and currency field (from fldtypes_XXXXXX.xsl):</p>
  
  <pre><code>&lt;xsl:template match ="FieldRef[@Name='MarkCalc']" mode="Text_body"&gt;
    &lt;xsl:param name="thisNode" select="."/&gt;
    &lt;xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping ="yes"/&gt;
  &lt;/xsl:template&gt;
  
  &lt;xsl:template match="FieldRef[@Name='CurrencyTest']" mode="Number_body"&gt;
    &lt;xsl:param name="thisNode" select="."/&gt;
    &lt;b&gt;&lt;xsl:value-of disable-output-escaping="yes" select="$thisNode/@*[name()=current()/@Name]" /&gt;&lt;/b&gt;
  &lt;/xsl:template&gt;
  </code></pre>
  
  <p>Then I tried to do the same for a lookup field, but it just won't work. This is my last attempt (I copied it from SharePoint designer). What am I missing?  </p>
  
  <pre><code>&lt;xsl:template match="FieldRef[(@Encoded) and @Name='Lookup1']" mode="Lookup_body"&gt;
    &lt;xsl:param name="thisNode" select="."/&gt;
    &lt;b&gt;&lt;xsl:value-of select="$thisNode/@*[name()=current()/@Name]" disable-output-escaping="yes" /&gt;&lt;/b&gt;
  &lt;/xsl:template&gt;
  </code></pre>