如何在 Firefox 和 Chrome 中显示 XML 页面(使用 xslt)。当我尝试使用 IE 时,它可以工作,但不能在 Firefox 和 Chrome 中工作。
<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="sample.xsl"?>
<root>
<title> This contains an 'embedded' HTML document </title>
<document>
<![CDATA[
<html>
<head>
</head>
<body>
<h4>Team Names test</h4>
<ul class="listStyle">
<li>REAP</li>
<li>NAMS</li>
<li>NCAT</li>
<li>YARDI</li>
</ul>
</body>
</html>
]]>
</document>
</root>
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="root">
<html>
<head>
</head>
<body class="chunk">
<document type="long" format="html" >
<xsl:value-of disable-output-escaping="yes" select="document"/>
</document>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
在 Firefox 中打开 XML 页面(使用 xslt)时,仅显示文本。当我尝试使用 IE 时,它可以工作,但不能在 Firefox 和 Chrome 中工作。