If there is image/filename then use the first filename found, otherwise show image not found. <xsl:choose> <xsl:when test=”image/filename”> <IMG> <xsl:attribute name=”src”> <xsl:value-of select=”image/filename[1]” /> </xsl:attribute> </IMG> </xsl:when> <xsl:otherwise> <IMG> <xsl:attribute name=”src”> <xsl:text>http://images.domain.com/NAN.gif</xsl:text> </xsl:attribute> </IMG> </xsl:otherwise> </xsl:choose>
All posts in category Xslt
If then Xslt Choose
Posted by peterdillon@gmail.com on October 24, 2010
http://www.peter-dillon.com/if-then-xslt-choose/
Currency Format Xslt
<div class=”list_price”>$<xsl:value-of select = “format-number(list_price,’#,###’)” /></div>
Posted by peterdillon@gmail.com on October 24, 2010
http://www.peter-dillon.com/currency-format-xslt/