📄 16-5.xsl
字号:
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:apply-templates select="所有书籍" />
</xsl:template>
<xsl:template match="所有书籍">
<table border="1">
<thead>
<tr>
<th onclick="orderby('名称');">名称</th>
<th onclick="orderby('作者');">作者</th>
<th onclick="orderby('简介');">简介</th>
<th onclick="orderby('出版日期');">出版日期</th>
<th onclick="orderby('售价');">售价</th>
</tr>
</thead>
<tbody>
<xsl:apply-templates select="图书" order-by="名称"/>
</tbody>
</table>
</xsl:template>
<xsl:template match="图书">
<tr align="center">
<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>
<xsl:value-of />
</td>
</xsl:template>
<xsl:template match="作者">
<td>
<xsl:value-of />
</td>
</xsl:template>
<xsl:template match="简介">
<td>
<xsl:value-of />
</td>
</xsl:template>
<xsl:template match="出版日期">
<td>
<xsl:value-of />
</td>
</xsl:template>
<xsl:template match="售价">
<td>
<xsl:value-of />
</td>
</xsl:template>
</xsl:stylesheet>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -