IE5.0无法查看xml文件?
2.xml
<?xml version="1.0" encoding ="gb2312"?>
<?xml-stylesheet type="text/xsl" href="ch09_02.xsl"?>
<states>
<state>
<name>California</name>
<population units="people">33871648</population><!--2000 census-->
<capital>Sacramento</capital>
<bird>Quail</bird>
<flower>Golden Poppy</flower>
<area units="square miles">155959</area>
</state>
<state>
<name>Massachusetts</name>
<population units="people">6349097</population><!--2000 census-->
<capital>Boston</capital>
<bird>Chickadee</bird>
<flower>Mayflower</flower>
<area units="square miles">7840</area>
</state>
<state>
<name>New York</name>
<population units="people">18976457</population><!--2000 census-->
<capital>Albany</capital>
<bird>Bluebird</bird>
<flower>Rose</flower>
<area units="square miles">47214</area>
</state>
</states>
ch09_02.xsl
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="states">
<HTML>
<BODY>
<xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="state">
<P>
<xsl:value-of select="name"/>
</P>
</xsl:template>
</xsl:stylesheet>
用IE5.0打开2.xml,无任何显示,页面空白。
把 <xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
替换为:<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
仍无任何显示,页面空白。
请问为什么这样?
问题点数:20、回复次数:1Top
1 楼ssm1226(雨中人(虚心学习))回复于 2005-01-26 17:28:42 得分 20
<?xml version="1.0" encoding="gb2312"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl">
<xsl:template match="/">
<xsl:apply-templates />
</xsl:template>
<xsl:template match="states">
<HTML>
<BODY>
<xsl:apply-templates/>
</BODY>
</HTML>
</xsl:template>
<xsl:template match="state">
<P>
<xsl:value-of select="name"/>
</P>
</xsl:template>
</xsl:stylesheet>
Top




