请教:为什么XSL文件中链接的样式表文件始终读不出来?

ah__fu 2003-09-12 04:46:12
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="text()" >
<xsl:value-of/>
</xsl:template>

<xsl:template match="/">
<html>
<head>
<title>菜单栏</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="images/all.css" rel="stylesheet" type="text/css" />
</head>

<body>
菜单<br/>
<div align="center">
<xsl:for-each select="/data/menu/item">
<a><xsl:attribute name="href"><xsl:value-of select="@url"/></xsl:attribute>
<xsl:attribute name="target"><xsl:value-of select="@target"/></xsl:attribute>
<xsl:value-of select="text()"/></a><br/><br/>
</xsl:for-each>
</div>
欢迎您,<xsl:value-of select="/data/userinfo/username"/>。<br/>
您现在的级别是:<font color="red"><xsl:value-of select="/data/userinfo/rightname"/></font>
</body>
</html>
</xsl:template>

</xsl:stylesheet>


以上是一个简单的XSL文件,里面的<link href="images/all.css" rel="stylesheet" type="text/css" />一句,怎么都不能把CSS文件调用出来。当然,在HTML文件中和路径都是对的。

这个问题实在很奇怪,不知道其他朋友见过没?请有经验的朋友一定帮忙解决,谢谢
...全文
109 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
ah__fu 2003-09-16
  • 打赏
  • 举报
回复
把CSS文件改成UTF-8格式就正确了
lions911 2003-09-14
  • 打赏
  • 举报
回复
应该是路径的问题,或者CSS文件本身的问题
孟子E章 2003-09-13
  • 打赏
  • 举报
回复
下载个看看,里面有例子
http://www.pcbookcn.com/list.asp?id=565
ssm1226 2003-09-12
  • 打赏
  • 举报
回复
确认CSS文件有效?

8,906

社区成员

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

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