﻿<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    xmlns:msxsl="urn:schemas-microsoft-com:xslt" exclude-result-prefixes="msxsl">
    <xsl:include href="PublicationsLinkedToCommunity.xslt"/>
   
    <xsl:template match="/">
                        
        <xsl:variable name ="HostName" select ="normalize-space(Publications/HostName)"></xsl:variable>
      
        
        <xsl:variable name="displayStyle">
            <xsl:choose>
                <xsl:when test="count(Publications/Publication) &gt; 3">
                    <xsl:text>display:inline</xsl:text>
                </xsl:when>
                <xsl:otherwise>
                    <xsl:text>display:none</xsl:text>
                </xsl:otherwise>
            </xsl:choose>
        </xsl:variable>

        <div id="divGetInspiredPublications">
            <xsl:if test="count(Publications/Publication) &gt; 0">
                <table class="tableMaster" border="0" cellspacing="0" cellpadding="0">
                    <tr>
                        <td align="center">
                            <xsl:for-each select="Publications/Publication[position() &lt;= 10]">
                                <xsl:call-template name="DisplayPublicationsLinkedToCommunity">
                                    <xsl:with-param name="ImageURL" select="ImageURL"></xsl:with-param>
                                    <xsl:with-param name="HostName" select="$HostName"></xsl:with-param>
                                    <xsl:with-param name="ItemID" select="normalize-space(ItemID)"></xsl:with-param>
                                    <xsl:with-param name="Title" select="Title"></xsl:with-param>
                                    <xsl:with-param name="Summary" select="Summary"></xsl:with-param>
                                </xsl:call-template>
                            </xsl:for-each>
                        </td>
                    </tr>
                </table>
            </xsl:if>
        </div>
    </xsl:template>
</xsl:stylesheet>
