XML在IE9下纯文本打开,有兼容性问题?

bonoji 2012-04-18 02:04:48
过去XML+XSLT一直使用正常,现在打开为纯文本,没有运行XSLT,贴出代码,请求答案:
XSLT文件:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<?xml-stylesheet type="text/css" href="js/xmlcss.css"?>
<xsl:template match="/">
<html>
<head>
<SCRIPT LANGUAGE="javascript">
<![CDATA[
var s1,p1;

function mover(where){
where.style.cursor='hand';
}

function view(obj,pic)
{
if (document.all[obj].style.display=="")
{
document.all[obj].style.display="none";
pic.all.tags('img')[0].src="../image/file-close.gif";

}
else
{

if(obj.length==5&&s1!=null)
{
document.all[s1].style.display="none";
p1.all.tags('img')[0].src="../image/file-close.gif";
s1=obj;p1=pic;
}
if(obj.length==5&&s1==null)
{s1=obj;p1=pic;}

document.all[obj].style.display="";

pic.all.tags('img')[0].src="../image/file-open1.gif";
}
}
]]>
</SCRIPT>
<base target="right"/>
</head>

<body background="../image/left.gif" vlink="#000000" alink="#000000" link="#000000" style="scrollbar-arrow-color:#ffcc66;SCROLLBAR-DARKSHADOW-COLOR: #D6EFFB;SCROLLBAR-FACE-COLOR:#D3D483;SCROLLBAR-ARROW-COLOR:#000000;SCROLLBAR-HIGHLIGHT-COLOR: #D6EFFB">
<table width="750" cellpadding="0" cellspacing="0">

<TR ALIGN="left"><TD><b><span style="text-decoration: none"><font size="2" color="#ff6600"><xsl:value-of select="BOOK/TITLE"/></font></span></b></TD></TR>
<tr><td height="5"></td></tr>
<xsl:for-each select="//PIECE">

<xsl:choose>
<xsl:when test="count(*)>0">
<tr ALIGN="left">
<td height="11" OnMouseOver="mover(this)" OnClick="view('item{@id}',this)">
<img src="../image/file-close.gif" width="11" height="11"></img>
<xsl:value-of select="/BOOK/blank"/>
<font size="2"><span style="text-decoration: none"><xsl:value-of select="@name"/></span></font>
</td>
</tr>
<tr>
<td style="padding-left:10px">
<DIV id="item{@id}" style="display:none">
<xsl:for-each select="CHAPTER">
<table><tr><td>
<xsl:choose>
<xsl:when test="count(*)>0">
<tr ALIGN="left">
<td height="11" OnMouseOver="mover(this)" OnClick="view('item{@id}',this)">
<img src="../image/file-close.gif" width="11" height="11"></img>
<xsl:value-of select="/BOOK/blank"/>
<font size="2"><a><xsl:attribute name="href"><xsl:value-of select="@link"/></xsl:attribute><span style="text-decoration: none"><xsl:value-of select="@name"/></span></a></font>
</td>
</tr>
<tr>
<td style="padding-left:10px">
<DIV id="item{@id}" style="display:none">
<xsl:for-each select="SECTION">
<table><tr><td>

....
</xsl:for-each>
</table>
</body>
</html>
</xsl:template>
</xsl:stylesheet>

XML文件:
<?xml version="1.0" encoding="GBK"?>
<?xml-stylesheet type="text/xsl" href="BOOK.XSL"?>
<!--DOCTYPE INVENTORY SYSTEM "INVENTORY.dtd"-->
<BOOK xmlns:dt="urn:schemas-microsoft-com:datatypes">
<TITLE cover="IMG/cover1.htm"></TITLE>
<blank> </blank>
<STRUCTURE>
。。。。。。。
急切
...全文
294 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧