﻿<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
  <xsl:output method="html" indent="no"/>
  <xsl:decimal-format NaN=""/>
  	<xsl:param name="Titlename" />
  	<xsl:param name="MoreLink" />
  	<xsl:param name="dvt_apos">'</xsl:param>
  	<xsl:variable name="dvt_1_automode">0</xsl:variable>
  	<xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:d="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
    	<xsl:call-template name="dvt_1"/>
  </xsl:template>
  	<xsl:template name="dvt_1">
    	<xsl:variable name="dvt_StyleName">Table</xsl:variable>
    	<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
    	<xsl:variable name="RowLimit" select="6" />
    <table border="0" cellpadding="2" cellspacing="0" class="LeftLinkTableStyle">
      <tr valign="top">
		<td class="LinkTitleStyle"><xsl:value-of select="$Titlename"/></td>
      </tr>
      <tr><td><marquee scrollamount='2' direction='up' style="height:100px;"><table>
      	<xsl:call-template name="dvt_1.body">
        	<xsl:with-param name="Rows" select="$Rows"/>
        	<xsl:with-param name="FirstRow" select="1" />
        	<xsl:with-param name="LastRow" select="$RowLimit" />
      	</xsl:call-template>
      	</table></marquee></td></tr>
      <tr><td class="ms-vb" align="right"><a href="{$MoreLink}">更多  &gt;&gt;</a></td></tr>
    </table>
  </xsl:template>
  	<xsl:template name="dvt_1.body">
    	<xsl:param name="Rows"/>
    	<xsl:param name="FirstRow" />
		<xsl:param name="LastRow" />
    	<xsl:for-each select="$Rows">
    		<xsl:sort select="@Modified" order="descending" data-type="text" />
	    	<xsl:variable name="dvt_KeepItemsTogether" select="false()" />
	    	<xsl:if test="(position() &gt;= $FirstRow and position() &lt;= $LastRow) or $dvt_KeepItemsTogether">
	      		<xsl:call-template name="dvt_1.rowview">
	      			<xsl:with-param name="NewsURL" select="concat(substring-before(@FileRef, '/Lists/'),'/Lists/',substring-before(substring-after(@FileRef, '/Lists/'),'/'))" />
	      		</xsl:call-template>
	   		</xsl:if>
    </xsl:for-each>
  </xsl:template>
  
  	<xsl:template name="dvt_1.rowview">
  		<xsl:param name="NewsURL" />
    <tr>
      	<xsl:if test="position() mod 2 = 1">
        	<xsl:attribute name="class">ms-alternating</xsl:attribute>
      </xsl:if>
      	<xsl:if test="$dvt_1_automode = '1'" ddwrt:cf_ignore="1">
        <td class="ms-vb" width="1%" nowrap="nowrap">
          <span ddwrt:amkeyfield="ID" ddwrt:amkeyvalue="ddwrt:EscapeDelims(string(@ID))" ddwrt:ammode="view"></span>
        </td>
      </xsl:if>
      <td class="ms-vb">
      <ul style="display:inline;line-height:200%;float:left;margin:0px;list-style:none;padding:0px;"><li>
      	<a href="{$NewsURL}/DispForm.aspx?ID={@ID}" target="_self" title="{@Title}">
			<div style="text-overflow:ellipsis; width:170px; white-space:nowrap; float:left;overflow:hidden; padding-left:10px;cursor:pointer;">
				<xsl:value-of select="@Title" />
			</div>
		</a>
      </li></ul>
      </td>
    </tr>
  </xsl:template>
</xsl:stylesheet>

