我的IE怎么不能正常显示xml啊?(100分)

Q

qzq

Unregistered / Unconfirmed
GUEST, unregistred user!
只要是用到了xsl,就不正常,
xsl中的静态html文本能解析,但xml中的数据怎么也显示不出来,
比如:<test>hello</test>中的"hello"显示不出来,但IE也没报错,
我的IE是5。5啊,版本应该够了吧,照着书上的很多例子做,还是不行。
 
检查一下有没有拼写错误或格式错误.
 
如果IE不是没设置好就是代码有问题!
 
我的IE5都能显示,你还是现发布一下代码吧。
 
test.xml:
-----------
<?xml version="1.0" ?>
<?xml-stylesheet type="text/xsl" href="test.xsl" ?>
<book>
<author>me</author>
<title>test</title>
</book>
------------
test.xsl:
------------
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:eek:utput method="xml"/>
<xsl:template match="/">
<html>
<head><title>test</title></head>
<body>
Test :<br/>
<table>
<xsl:apply-templates select="book"/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="book">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="author"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
------------------
大家看看吧
 
这是MS的IE不支持:
1.namespace
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:xsl="http://www.w3.org/TR/WD-xsl"
2.不支持output
delete it

result:"test.xsl"
<?xml version='1.0'?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<html>
<head><title>test</title></head>
<body>
Test :<br/>
<table>
<xsl:apply-templates select="book"/>
</table>
</body>
</html>
</xsl:template>
<xsl:template match="book">
<tr>
<td><xsl:value-of select="title"/></td>
<td><xsl:value-of select="author"/></td>
</tr>
</xsl:template>
</xsl:stylesheet>
 
用Mozillo挺好的。
 
多人接受答案了。
 
顶部