Sunday, 1 September 2013

Sort the brands using xslt

Sort the brands using xslt

I have a list of brands ,but it not in order .I need to sort the brand by
their names.here is my code
<xsl:variable name="resultxmls"
select="umbraco.library:GetXmlDocumentByUrl($url, 0)
<div class="logo-panel-01">
<ul class="blist">
<xsl:for-each select="$resultxmls/asn/group[@name='Brand']/element">
<li class="bitem">
<xsl:variable name="brandLogo">
<xsl:text>images\logo-images\</xsl:text>
<xsl:value-of select="@name"/>
<xsl:text>_logo.jpg</xsl:text>
</xsl:variable>
<xsl:choose>
<xsl:when test="XSLTHelper:FileExists($brandLogo) = 'true'">
<a href="/search?query={@name}&amp;searchField=Brand">
<img
src="/images/imagehandler.ashx?path=/images/logo-images/{@name}_logo.jpg&amp;width=100&amp;height=60&amp;constrain=true&amp;pad=false"
alt="{@name}"/>
</a>
</xsl:when>
<xsl:otherwise>
<a href="/soeg?query={@name}&amp;searchField=Brand">
<span>
<xsl:value-of select="@name" disable-output-escaping="yes"/>
</span>
</a>
</xsl:otherwise>
</xsl:choose>
</li>
</xsl:for-each>
</ul>
</div>
<div>
How can I sort this list?

No comments:

Post a Comment