I’m getting a following response from the back-end servers to display the data as quick links on the right side of the search results page.
<NavigatorItems>
<Navigator Name="Shoes">
<Name>Nike</Name>
<WebSite>www.nike.com</WebSite>
<Name>Reebok</Name>
<WebSite>www.reebok.com</WebSite>
<Name>Adidas</Name>
<WebSite>www.adidas.com</WebSite>
<ShowAll>www.mysite.com/showallshoes</ShowAll>
</Navigator>
<Navigator Name="Clothes">
<Name>Lee Jeans</Name>
<WebSite>www.lee.com</WebSite>
<Name>Levis</Name>
<WebSite>www.levi.com</WebSite>
<Name>Lawman</Name>
<WebSite>www.lawman.com</WebSite>
<ShowAll>www.mysite.com/showallclothes</ShowAll>
</Navigator>
</NavigatorItems>
I need to display these items using XSLT something like this:

The sample XSLT suggested by someone is something like this:
<xsl:for-each select="NavigatorItems/Navigator">
<xsl:variable name="link" select="WebSite"/>
<tr>
<td><a href ="{$link}"><xsl:value-of select="Name"/></td>
</tr>
<xsl:test select="ShowAll">
<xsl:variable name="linkShowAll" select="ShowAll"/>
<tr> <td> <a href="{$linkShowAll}"> View More Results <td> </tr>
</xsl:test>
</xsl:for-each>
But it displays only
Nike (with its appropriate link)
Lee (with its appropriate link)
Where I’m going wrong with this ? I tried a lot to modify the XSLT and checked but no luck.
Please suggest.
This transformation:
when applied to the provided XML document:
produces the wanted, correct result:
and the browser displays it like this:
Shoes
View More Results
Clothes
View More Results