版本不符出现的问题

book.dtd内容如下:

----------------------
book.xml

 1<books>
 2<book>
 3<name>Java编程思想</name>
 4<author>Bruce Eckel</author>
 5</book>
 6<book>
 7<name>VB.NET高级指南</name>
 8<author>Bruce Eckel</author>
 9</book>
10</books>

----------------------
book.xsl

 1<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 2<xsl:output encoding="gb2312" method="html"></xsl:output>
 3<xsl:template match="/">
 4<html>
 5<head>
 6<title>最畅销图书列表</title>
 7</head>
 8<body>
 9<xsl:apply-templates select="//book"></xsl:apply-templates>
10</body></html>
11</xsl:template>
12<xsl:template match="book">
13<p>
14<xsl:value-of select="name"></xsl:value-of>
15</p>
16</xsl:template>
17</xsl:stylesheet>

---------------------
为什么浏览器是空白,什么也没显示,但不报错!什么原因!!!!
急死了!!!!急死了!!!!急死了!!!!急死了!!!!急死了!!!!

---------------------------------------------------------------

如果是IE5的话:
1.IE5用的是旧的名称空间:http://www.w3.org/TR/WD-xsl,你把<="http://www.w3.org/1999/XSL/Transform">改过来试一下。

2.IE5不支持xsl:output这个命令,注释掉再试试。
---------------------------------------------------------------

 1<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
 2<xsl:template match="/">
 3<html>
 4<head>
 5<title>最畅销图书列表</title>
 6</head>
 7<body>
 8<xsl:apply-templates select="//book"></xsl:apply-templates>
 9</body></html>
10</xsl:template>
11<xsl:template match="book">
12<p>
13<xsl:value-of select="name"></xsl:value-of>
14</p>
15</xsl:template>
16</xsl:stylesheet>
Published At
Categories with Web编程
Tagged with
comments powered by Disqus