新手求教:下面的XML,XSL有何不对?
我编写了一个XML和XSL,然后用下面的链接访问:http://localhost/web/default.xml
-------------default.xml---------------------------------
<?xml version="1.0" encoding="gb2312" standalone="no" ?>
<?xml-stylesheet type="text/xsl" href="default.xsl" ?>
<Pages>
<Page><Caption>Page1</Caption><Url>http://localhost/Page1.htm</Url></Page>
</Pages>
------------default.xsl---------------------------------
<?xml version="1.0" encoding="gb2312" ?>
<xsl:stylesheet xmlns:xsl="http://www.duanlian.com/">
<xsl:template><xsl:apply-templates /></xsl:template>
<xsl:template match="Pages">
<html>
<head><title>知识库</title></head>
<body>
<table title="示例" align="center">
<xsl:for-each select="Page">
<td><xsl:value-of select="Caption" /></td>
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
无法显示 XML 页。
使用 样式表无法查看 XML 输入。请更正错误然后单击 刷新按钮,或以后重试。
--------------------------------------------------------------------------------
不支持从当前编码到指定编码的切换。处理资源 'http://localhost/web/default.xml' 时出错。第 1 行,位置: 57
<?xml version="1.0" encoding="gb2312" standalone="no" ?>
然后我把编码由 gb2312改为:utf-8,不再报错,但却没有任何内容显示!
请问这两个问题该如何解决?