loading
<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="Sub">1</xsl:variable> <xsl:variable name="Top">10</xsl:variable> <xsl:template match="/subject"> <xsl:for-each select="option[position() &lt;= $Top]"> <!-- order="ascending" --> <table width="142" border="0" align="center" cellpadding="0" cellspacing="0"> <tr class="tc th"> <td width="72"> <xsl:choose> <xsl:when test="string-length(title/text()) &gt; 4"> <xsl:value-of select="substring(title,0,4)"/> </xsl:when> <xsl:otherwise> <xsl:value-of select="title"/> </xsl:otherwise> </xsl:choose> </td> <td width="70"><xsl:value-of select="number(count)"/></td> </tr> </table> </xsl:for-each> </xsl:template> </xsl:stylesheet>