📄 tt.xsl
字号:
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<html>
<head>
<title> 动态排序</title>
</head>
<body>
<h1 align="center">动态排序</h1>
<div id="Layer1" name="Layer1">
<xsl:apply-templates select="学生列表"/>
</div>
</body>
</html>
</xsl:template>
<xsl:template match="学生列表">
<table width="500" border="1" align="center" cellpadding="1" cellspacing="1">
<tr bgcolor="#FFCC99" align="center">
<td style="cursor:s-resize" onClick="taxis('学号')">学号</td>
<td style="cursor:s-resize" onClick="taxis('姓名')">姓名</td>
<td style="cursor:s-resize" onClick="taxis('性别')">性别</td>
<td style="cursor:s-resize" onClick="taxis('班级')">班级</td>
<td style="cursor:s-resize" onClick="taxis('出生年月')">出生年月</td>
</tr>
<xsl:apply-templates select="学生">
<xsl:sort select="学号"/>
</xsl:apply-templates>
</table>
</xsl:template>
<xsl:template match="学生">
<tr>
<xsl:apply-templates select="学号"/>
<xsl:apply-templates select="姓名"/>
<xsl:apply-templates select="性别"/>
<xsl:apply-templates select="班级"/>
<xsl:apply-templates select="出生年月"/>
</tr>
</xsl:template>
<xsl:template match="学号">
<td bgcolor="#eeeeee">
<xsl:value-of/>
</td>
</xsl:template>
<xsl:template match="姓名">
<td align="left">
<xsl:value-of/>
</td>
</xsl:template>
<xsl:template match="性别">
<td align="left">
<xsl:value-of/>
</td>
</xsl:template>
<xsl:template match="班级">
<td align="left">
<xsl:value-of/>
</td>
</xsl:template>
<xsl:template match="出生年月">
<td align="left">
<xsl:value-of/>
</td>
</xsl:template>
</xsl:stylesheet>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -