为什么我的XML文件不能正确显示?
第一个是XML文件:
<?xml version="1.0" encoding="GB2312"?>
<?xml-stylesheet type="text/xsl" href="Ex7-3.xsl" ?>
<!-- 2003年世界杯中国队所以C组情况 -->
<CnGame>
<Opponent>
<!-- ID="C1"表示该球队在C组的编号 -->
<TeamName ID="C1">巴西</TeamName>
<Place>韩国西归埔</Place>
<Date>2002年6月</Date>
<Time>19:30</Time>
<star>
<!-- Number="" 表明该球星的编号,下同 -->
<StarName Number=" ">罗纳而多</StarName>
<StarName Number=" ">里瓦尔多</StarName>
</star>
<Coach>
<CoachName>斯科拉里</CoachName>
<Birthday>1984年9月11日</Birthday>
<Interesting>上网</Interesting>
</Coach>
</Opponent>
<Opponent>
<!-- ID=C1 表明该球队在C组的编号 -->
<TeamName ID="C2">土耳其</TeamName>
<Place>韩国汉城</Place>
<Date>2002年6月12日</Date>
<Time>14:30</Time>
<Star>
<StarName>哈坎。苏克</StarName>
<StraName>奥坎</StraName>
</Star>
<Coach>
<CoachName>吉内斯</CoachName>
<Birthday>1995年</Birthday>
<Interesting>登山</Interesting>
</Coach>
</Opponent>
<Opponent>
<TeamName ID="C4">哥斯达黎加斯</TeamName>
<Place>韩国光广州</Place>
<Date>2002年12月12日</Date>
<Time>14:30</Time>
<Star>
<StarName>万乔普</StarName>
<StarName>梅森</StarName>
</Star>
<Coach>
<CaochName>吉马瑞</CaochName>
<Birthday>1959年12月20日</Birthday>
<Interesting>音乐</Interesting>
</Coach>
</Opponent>
</CnGame>
第二个是:
<?xml version="1.0" encoding="GB2312"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/xsl/Transform">
<xsl:template match="/">
<xsl:apply-templates></xsl:apply-templates>
</xsl:template>
<xsl:template match="/CnGame/Opponent">
<!-- 给CoachName加上编号 -->
<pre>
教练编号及名字
<xsl:value-of select="position()"/>
<xsl:value-of select="Coach/CoachName"/>
</pre>
</xsl:template>
</xsl:stylesheet>
用浏览器预览时,只看到“教练编号及名字”几个字,其它的全是空白,请各位指点这是怎么回事,谢谢了!