xsl 问题,100分求教!在线等!!

zhao200163 2008-12-18 10:02:42
一个表,原有一行两列,
调用一个模板t1,返回一行两列(包括<tr><td>标签),
这时,这个表有两行两列,
在 IE 下正常显示,但在 firefox 下不行。
在 firefox 下只返回一行两列的数据(去掉了<tr><td>标签)
这时这个表就只有一行两列,下面有些数据。
得不到想要的结果:两行两列
请问应该怎么做?

test.xml 如下:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type='text/xsl' href='test.xsl' ?>
<test>
</test>

test.xsl 如下:
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
</head>
<body>
<table border="1">
<tr>
<td>aaa</td><td>bbb</td>
</tr>
<xsl:call-template name="t1">
<xsl:with-param name="nodes" select="Topic"/>
</xsl:call-template>
</table>
</body>
</html>
</xsl:template>

<xsl:template name="t1">
<xsl:param name="nodes"/>
<tr>
<td>模板二</td><td>模板二</td>
</tr>
</xsl:template>

</xsl:stylesheet>
...全文
74 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
zhao200163 2008-12-18
  • 打赏
  • 举报
回复
那个地方只是做样子,简化成空xml了。跟它无关的
herowach 2008-12-18
  • 打赏
  • 举报
回复
select="Topic"?
你的XML是不是不对啊?
zhao200163 2008-12-18
  • 打赏
  • 举报
回复

8,906

社区成员

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

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