So I was building a standard dataview in SharePoint 2010. I had the $thisNode information, but I couldn't figure out why my $thisNode/@Priority was not working for my Priority field. I realized it was a lookup field. Thanks to Marc Anderson I could do a print statement and figure out how to parse out the Priority from after the #. Here is a nice snippet to get information for a Lookup in a condition in XSLT:
<xsl:param name="thisPriority" select="substring-after($thisNode/@Priority.,'#')"/>
First you want to put your parsed out data into a parameter
<xsl:if test="$thisPriority = 'High'" ddwrt:cf_explicit="1"><img alt="{$thisPriority}" src="/_layouts/images/kpidefault-2.gif" /></xsl:if>
<xsl:if test="$thisPriority = 'Medium'" ddwrt:cf_explicit="1"><img alt="{$thisPriority}" src="/_layouts/images/kpidefault-1.gif" /></xsl:if>
<xsl:if test="$thisPriority = 'Low'" ddwrt:cf_explicit="1"><img alt="{$thisPriority}" src="/_layouts/images/kpidefault-0.gif" /></xsl:if>
Next you can put the parameter data into a condition to determine based on high, medium, or low priority the proper picture to show.
Hopefully, this post helps save countless hours for someone else parsing out conditions in XSLT using a lookup field. Enjoy!