<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="channel">
<xsl:variable name="basePath" select="basePath"/>
<xsl:variable name="listSize" select="params/listSize"/>
<xsl:variable name="import_user_item" select="messages/import_user_item"/>
<div class="widget-content">
<table width="90%" border="0" cellpadding="1" cellspacing="2" style="table-layout:fixed;">
<tr>
<td width="76%"></td>
<td width="24%"></td>
</tr>
<xsl:for-each select="item">
<xsl:sort select="subject" /> <!--根据标题排序 -->
<tr>
<td align="left" style="overflow: hidden; white-space: nowrap; padding: 0pt 0pt 0pt 0px;">
<img>
<xsl:attribute name="src"><xsl:value-of select="$basePath" />/images/desk/img/lit_tub.jpg</xsl:attribute>
</img>
<xsl:value-of select="subject" />
</td>
<td align="right">
<xsl:value-of select="substring-before(createAt,' ') "/>
</td>
</tr>
</xsl:for-each>
</table>
<xsl:if test="$listSize > 0">
<h3 align="right">
<a target="_blank">
<xsl:attribute name="href">
<xsl:value-of select="$basePath" />/news.do?method=toLoadList
</xsl:attribute>
<xsl:value-of select="messages/more" />
</a>
</h3>
</xsl:if>
<xsl:if test="$listSize = 0">
0<xsl:value-of select="$import_user_item" />
</xsl:if>
</div>
</xsl:template>
</xsl:stylesheet>
文中用红色注明的为解决方案
另外得控制住每列的宽度,用具体像素或者百分比都OK
弄了好久,终于解决了。。。