I'm new to XSL, but we recently got a Google Mini server here and I ran into som e coding issues when trying to customize the XSLT stylesheet. I have been able to find my way around and modify plenty of things but I am having trouble with some custom code...
What I am trying to do is check for a meta tag named gimag and if it exists, display a product image (the value of the meta tag is the image file path.) I have been able to do that fine, but when that meta tag doesn't exist I want to display a transparent image (so all the search results line up correctly.)
Here is what I have so far which isn't working:
<xsl:text disable-output-escaping="yes"><td width="67" align="center"></xsl:text>
<xsl:if test="MT">
<xsl:for-each select="MT">
<xsl:if test="@N='gimage' and @V!=''">
<xsl:choose>
<xsl:when test="@N='gimage' and @V!=''">
<xsl:text disable-output-escaping="yes"><a href="</xsl:text>
<xsl:value-of select="$full_url"/>
<xsl:text disable-output-escaping="yes">"></xsl:text>
<img align="absmiddle" src="{@V}" height="60" border="0"/><xsl:text disable-output-escaping="yes"></a></td></xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text disable-output-escaping="yes"><img align="left" src="http://www.atomicpark.com/images/accents/transparent-5x3.gif" width="62" height="60" /></td></xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:if>
</xsl:for-each>
</xsl:if>
What am I doing wrong?
Thanks.
Al Dugan
www.atomicpark.com