正在读取数据……
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="html" encoding="gb2312" indent="yes"/> <xsl:variable name="Top">15</xsl:variable> <xsl:template match="/subject"> <xsl:for-each select="option[position() &lt;= $Top]"> <!-- order="ascending" 正序排列--> <table width="178" border="0" cellspacing="0" cellpadding="0"> <tr> <td width="82" class="vote_tit"> <xsl:choose> <xsl:when test="string-length(title/text()) &gt; 6"> <xsl:value-of select="substring(title,0,6)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="title"/> </xsl:otherwise> </xsl:choose> </td> <td width="56"> <div class="vote_bg"> <div class="vote"> <xsl:attribute name="style"> <xsl:text>width:</xsl:text> <xsl:value-of select="number(percent)"/><xsl:text>%</xsl:text> </xsl:attribute> </div> </div> </td> <td width="40" class="count"><xsl:value-of select="number(count)"/></td> </tr> </table> </xsl:for-each> </xsl:template> </xsl:stylesheet>