以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 XSL/XSLT/XSL-FO/CSS 』  (http://bbs.xml.org.cn/list.asp?boardid=8)
----  [求助]在ie6.0下开发的xsl/XML到了ie7.0下都不能显示了!!!!在线等!!!急急急  (http://bbs.xml.org.cn/dispbbs.asp?boardid=8&rootid=&id=49781)


--  作者:m01m60
--  发布时间:7/12/2007 10:13:00 AM

--  [求助]在ie6.0下开发的xsl/XML到了ie7.0下都不能显示了!!!!在线等!!!急急急
[color=#0000FF]我们在ie6.0下开发的xsl/XML到了ie7.0下都不能显示了,请高手帮助解决一下!!!!!![/color]
--  作者:Qr
--  发布时间:7/12/2007 10:29:00 AM

--  
偶的没问题,不过没有在XP+IE7中测试,而是在VISTA+IE7中。重装MSXML试试。

再有,似乎曾经听说IE7不再支持草案版的XSL,现在不清楚,你的XSL是不是用这个版本?


--  作者:m01m60
--  发布时间:7/12/2007 10:55:00 AM

--  
这是我的XSL文件:
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/INFORMATION">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>
<xsl:value-of select="CAPTION"/>
</title>
<style type="text/css">
@import url("/common/css/heihe.css");
body {
 margin-left: 0px;
 margin-top: 0px;
 margin-right: 0px;
 margin-bottom: 0px;
 font-size: 9pt;
        z-index:0;
}
.STYLE1 {color: #0072BC}
.STYLE2 {color: #00A651}
.STYLE3 {color: #8DC63F}
.STYLE5 {color: #F7941D}
.STYLE6 {color: #ED1C24}

</style>
</head>

<body  oncontextmenu="return false"
    ondragstart="return false"
    onselectstart ="return false"
    onselect="document.selection.empty()"
    oncopy="document.selection.empty()"
    onbeforecopy="return false"
    onmouseup="document.selection.empty()">
<table width="820" border="0" align="center" cellpadding="0" cellspacing="0" class="table">
  <tr>
    <td><table width="820" border="0" align="center" cellpadding="0" cellspacing="0" class="table_n">
      <tr>
        <td colspan="2" valign="top" background="/common/images-zh/mb_07.jpg"><table width="702" border="0" align="center" cellpadding="0" cellspacing="0" background="/common/images-zb/mb_02.jpg">
          <tr>
            <td><table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td background="/common/images-zb/mb_05.jpg" class="table_mb_bt_td" align="center">
                  <div align="center" class="table_mb_bt">
     <!--标题-->
                <xsl:value-of select="CAPTION"/>
    </div>
                </td>
              </tr>
              <tr>
                <td colspan="3" class="table_mb_sj_td"><div align="center" class="table_mb_sj">
    <!--时间-->
             <xsl:variable name="date" select="EIDTDATE"/>
     <xsl:call-template name="format-date">
      <xsl:with-param name="date" select="$date" />
     </xsl:call-template>
    </div></td>
                </tr>

              <tr>
                <td height="360" colspan="3" valign="top" class="table_mb_zw_td">
    <!--内容-->
                 <xsl:value-of select="CONTENT" disable-output-escaping="yes"/>
    </td>
                </tr>
          <tr>
                <td class="table_mb_zw_td">
                <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_mb_tp_s">
                    <tr>
                    <!--相关图片-->
                    <xsl:for-each select="IMAGELIST/IMAGE">
                      <td class="table_mb_tp_s_td" align="left">
                      <div align="center">
                       <xsl:element name="a">
                       <xsl:attribute name="href"><xsl:value-of select="PRFULL"/></xsl:attribute>
                      <xsl:attribute name="target">_blank</xsl:attribute>
                       <xsl:element name="image">
       <xsl:attribute name="src"><xsl:value-of select="PRTHMB"/></xsl:attribute>
       <xsl:attribute name="width">80</xsl:attribute>
       <xsl:attribute name="height">80</xsl:attribute>
       <xsl:attribute name="border">0</xsl:attribute>
      </xsl:element>
      </xsl:element>
                      </div>
                      </td>
                   </xsl:for-each>
                            </tr>
                </table></td>
              </tr>
          <tr>
                <td class="table_mb_zw_td">
                <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_mb_tp_s">
                  <xsl:if test="APPENDIXLIST!=''">
                    <tr>
                      <td align="left">
                        附件:
                      </td>
                    </tr>
                  </xsl:if>
                    <!--附件-->
                    <xsl:for-each select="APPENDIXLIST/APPENDIX">
                    <tr>
                      <td align="left">         
                       <xsl:element name="a">
                       <xsl:attribute name="href"><xsl:value-of select="LOCAL"/></xsl:attribute>
                         <xsl:value-of select="NAME" disable-output-escaping="yes"/>
                        </xsl:element>
                      </td>
                    </tr>
                   </xsl:for-each>

                </table></td>
              </tr>
            </table></td>
          </tr>

        </table>
          <table border="0" align="center" cellpadding="0" cellspacing="0" class="table_mb">
            </table>
          </td>
        </tr>


    </table></td>
  </tr>
</table>
</body>
</html>
<script language="javascript">
if(document.all("mainimage")!=null){
document.all("mainimage").height=130;
document.all("mainimage").width= document.all("mainimage").offsetWidth/document.all("mainimage").height*130;
}
parent.document.all("newsContext").style.height=document.body.scrollHeight;
</script>
</xsl:template>
<xsl:template name="format-date">
  <xsl:param name="date" />
  <xsl:param name="format" select="0" />
  <xsl:variable name="day" select="substring-before(substring-after(substring-after($date, '-'), '-'),' ')" />
  <xsl:variable name="year" select="substring-before($date,'-')" />
  <xsl:variable name="month" select="substring-before(substring-after($date, '-'),'-')" />
  <xsl:value-of select="concat($year, '年',$month , '月',$day ,'日')" />
</xsl:template>
</xsl:stylesheet>


帮着看看有什么问题吗?


--  作者:hexun831012
--  发布时间:7/12/2007 12:24:00 PM

--  
加个<xsl:output method="html" indent="no" omit-xml-declaration="yes"/>看看
--  作者:m01m60
--  发布时间:7/12/2007 1:51:00 PM

--  
加了,但是没有效果啊
--  作者:Qr
--  发布时间:7/12/2007 3:42:00 PM

--  
贴一小段结构完整的XML出来偶试试。
--  作者:m01m60
--  发布时间:7/12/2007 4:15:00 PM

--  
XML文件:
<?xml version="1.0" encoding="GB2312"?>
<?xml-stylesheet type="text/xsl" href="/news_template/template_76_zh.xsl"?>
<INFORMATION>
<MERCHANTID>2007</MERCHANTID>
<ZBNBR></ZBNBR>
<USERID>bmadmin</USERID>
<INFOTYPE>76</INFOTYPE>
<EIDTDATE>2007-07-11 10:04:37</EIDTDATE>
<CAPTION>r4444444444444r444444444444</CAPTION>
<TITLEIMAGE>
<PRFULLMAIN></PRFULLMAIN>
<PRTHMBMAIN></PRTHMBMAIN>
</TITLEIMAGE>
<CONTENT><![CDATA[r44444444444444444444444444444ddddddddd]]></CONTENT>
<IMAGELIST></IMAGELIST>
<STARTDATE>2001-01-01</STARTDATE>
<ENDDATE>2001-01-01</ENDDATE>
<BRIEF></BRIEF>
<APPENDIXLIST></APPENDIXLIST>
</INFORMATION>

--  作者:Qr
--  发布时间:7/12/2007 4:18:00 PM

--  
encoding不一致,这是个坏习惯。改了再试试
--  作者:Qr
--  发布时间:7/12/2007 4:19:00 PM

--  
encoding不一致,这是个坏习惯,改了再试试看。
--  作者:m01m60
--  发布时间:7/12/2007 4:39:00 PM

--  
统一后还是没效果
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
97.656ms