?? ex_3.xsl
字號:
<?xml version="1.0" encoding="GB2312" ?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- IE5 只接受 <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"> -->
<!-- IE5 看不懂 xsl:output -->
<xsl:output encoding="GB2312"/>
<xsl:template match="/">
<html>
<head>
<title>產品搜尋結果</title>
</head>
<body>
<h1>產品搜尋結果</h1>
<p><b>摘要:</b><xsl:value-of select="*/摘要"/></p>
<xsl:apply-templates select="產品搜尋"/>
</body>
</html>
</xsl:template>
<xsl:template match="產品搜尋">
<table>
<tr>
<th>品名</th>
<th>定價</th>
<th>說明頁</th>
</tr>
<xsl:for-each select="產品">
<tr>
<td><xsl:value-of select="品名"/></td>
<td><xsl:value-of select="定價"/></td>
<td><a href="{說明頁/@網址}"><xsl:value-of select="說明頁"/></a></td>
<!-- IE5 只接受 <td><a><xsl:attribute name="href"><xsl:value-of select="說明頁/@網址"/></xsl:attribute><xsl:value-of select="說明頁"/></a></td> -->
</tr>
</xsl:for-each>
</table>
</xsl:template>
</xsl:stylesheet>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -