最简单的xsl & xml问题
我有一个很简单的xml文件:
loading.xml
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="Loading.xsl"?>
<loadingInfo>
<empID name="Davids">e001</empID>
<from>9</from>
<to>17</to>
</loadingInfo>
想用loading.xsl转换为html,输出name:
<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://epm008/2004/XSL/Loading">
<xsl:output method="html"/>
<!--Æ¥ÅäÎĵµ¸ùÎļþ-->
<xsl:template match="/">
<html>
<head>
<title>First XSLT example</title>
</head>
<body>
<ul>
<xsl:apply-templates select="loadingInfo/empID"/>
</ul>
</body>
</html>
</xsl:template>
<xsl:template match="empID">
<p>employee name is a <xsl:value-of select="@name"/></p>
</xsl:template>
</xsl:stylesheet>
但是在浏览器(ie6)输出还是只有"employee name is a "
为什么会这样?这个已经是最简单的xsl转换了.....