All posts in category Xslt

If then Xslt Choose

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>

Currency Format Xslt

<div class=”list_price”>$<xsl:value-of select = “format-number(list_price,’#,###’)” /></div>