<?xml version="1.0"?>

<!DOCTYPE xsl:stylesheet [<!ENTITY nbsp "&#160;">
<!ENTITY images "Images/">
]>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"                 xmlns:sse="urn:www-sharplabs-com:sse:search"                xmlns:sds="urn:www-sharplabs-com:sds:search"                version="1.0">

  <xsl:output method="html" doctype-public="-//W3C//DTD HTML 4.0 Transitional//EN" cdata-section-elements="sse:Abstract" />
  
  <xsl:template match="sse:Results">
    <table width="100%" border="0" cellspacing="2" cellpadding="2" bgcolor="#EEEEEE">
      <tr> 
        <th class="Match Score"> 
          <div align="center"><loc id="IDS_SUMMARY_SCORE">Punteggio</loc></div>
        </th>
        <th class="Hit Count"> 
          <div align="center"><loc id="IDS_SUMMARY_HITS">Colpi</loc></div>
        </th>
        <th class="Document Name" colspan="2"> 
          <div align="center"><loc id="IDS_SUMMARY_DOCUMENT">Documento</loc></div>
        </th>
        <th class="Location"> 
          <div align="center"><loc id="IDS_SUMMARY_LOCATION">Locazione</loc></div>
        </th>
        <th class="Document Type"> 
          <div align="left"><loc id="IDS_SUMMARY_TYPE">Tipo</loc></div>
        </th>
        <th class="Document Size"> 
          <div align="left"><loc id="IDS_SUMMARY_SIZE">Formato (KB)</loc></div>
        </th>
        <th class="Modification Date"> 
          <div align="left"><loc id="IDS_SUMMARY_MODIFIED">Modificato</loc></div>
        </th>
      </tr> 
      <xsl:apply-templates/>
    </table>
  </xsl:template>
  
  <xsl:template match="sse:Result">
    <xsl:if test="sse:Active = 'true'">
      <tr><xsl:call-template name="ResultDisplay"></xsl:call-template></tr>
	</xsl:if>
    <xsl:if test="sse:Active != 'true'">
	    <xsl:if test="contains(sse:FileName, '>') = false">
		 <tr disabled="true"><xsl:call-template name="ResultDisplay"></xsl:call-template></tr>
	   </xsl:if>
    </xsl:if>
  </xsl:template>

  <xsl:template name="ResultDisplay">
    <td class="Match Score" align="center"><xsl:value-of select="sse:Score"/></td>
    <td class="Hit Count" align="center"><xsl:value-of select="sse:HitCount"/></td>
    <td class="Document Name" align="center">
      <sds:document_view id="document_view" unique_id="{sse:DocId}" type="icon" path="{sse:FileName}" active="{sse:Active}" width="24" height="24" />
    </td>   
    <td class="Document Name" ><span id="document_name"><xsl:value-of select="sse:DisplayName"/></span></td>
    <td class="Location" align="left"><a id="document_path" href=""><xsl:value-of select="sse:FileName"/></a></td>
    <td class="Document Type" align="left"><xsl:value-of select="sse:Type"/></td>
    <td class="Document Size" align="left"><xsl:value-of select="sse:Size"/></td>
    <td class="Modification Date" align="left"><xsl:value-of select="sse:Date"/></td>
  </xsl:template>
          
</xsl:stylesheet>
