chrome中只有在服务器的目录下才可以正确显示xsl格式的xml,而IE却可以直接显示。chrome为什么非得放到服务器目录下呢?
xml文件:
<?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>
<head>
<title>一个简单的XSL文档</title>
</head>
<body>
<p><a href="">书名:<xsl:value-of select="图书/书名"/></a></p>
<p>作者:<xsl:value-of select="图书/作者"/></p>
<p>价格:<xsl:value-of select="图书/价格"/></p>
<p>出版社:<xsl:value-of select="图书/出版社"/></p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>
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>
<head>
<title>一个简单的XSL文档</title>
</head>
<body>
<p><a href="">书名:<xsl:value-of select="图书/书名"/></a></p>
<p>作者:<xsl:value-of select="图书/作者"/></p>
<p>价格:<xsl:value-of select="图书/价格"/></p>
<p>出版社:<xsl:value-of select="图书/出版社"/></p>
</body>
</html>
</xsl:template>
</xsl:stylesheet>