以文本方式查看主题

-  计算机科学论坛  (http://bbs.xml.org.cn/index.asp)
--  『 XSL/XSLT/XSL-FO/CSS 』  (http://bbs.xml.org.cn/list.asp?boardid=8)
----  求助:xsl哪里出现了问题?  (http://bbs.xml.org.cn/dispbbs.asp?boardid=8&rootid=&id=13065)


--  作者:nhlsm
--  发布时间:12/28/2004 4:56:00 PM

--  求助:xsl哪里出现了问题?
我是一初学者,下面的xml文档和xsl样式表不能很好的工作,在IE显示时,它不能把XML里的节点内容显示出。为什么?
<!--下面是一个xml文档-->
<?xml version='1.0' encoding='gb2312'?>
<?xml-stylesheet type='text/xsl' href='ex23.xsl'?>
<document>
<music>
<title>龙的传人</title>
<author1>刘德华</author1>
<author2>刘德华</author2>
<singer>刘</singer>
<lyric>遥远的东方有一条江,它的名字是叫长江。遥远的东方面军有一条河</lyric>
</music>
<music>
<title>冬季到台北来看雪</title>
<author1>李长江</author1>
<author2>孟子</author2>
<singer>孟庭苇</singer>
<lyric>冬季到台北来看雪</lyric>
</music>

<!--下面是该文档的xsl-->
<?xml version='1.0' encoding="gb2312"?>
<xsl:stylesheet version='1.0' xmlns:xsl='http://www.w3.org/1999/xsl/transform'>
<xsl:template match='/'>
<h2 align="center">仙乐</h2>
<span><strong>歌名:</strong></span>
<span styple='font-size:20'>
<xsl:value-of select="document/music/title"/>
</span>
<br/>
<span><strong>词作者:</strong></span>
<span styple='font-size:20'>
<xsl:value-of select="document/music/author1"/>
</span>
<br/>
<span><strong>曲作者:</strong></span>
<span styple='font-size:20'>
<xsl:value-of select="document/music/author2"/>
</span>
<br/>
<span><strong>歌手:</strong></span>
<span styple='font-size:20'>
<xsl:value-of select="document/music/singer"/>
</span>
<br/>
<span><strong>歌词:</strong></span>
<span styple='font-size:20'>
<xsl:value-of select="document/music/lyric"/>
</span>
<br/>
</xsl:template>
</xsl:stylesheet>



--  作者:anchen0617
--  发布时间:12/29/2004 8:16:00 PM

--  
你写的代码本身就有问题啊,看看如何改一下了
--  作者:hyl_fr
--  发布时间:1/13/2005 10:48:00 AM

--  
是不是需要for-each
--  作者:zyj0017
--  发布时间:1/31/2005 6:47:00 PM

--  
只能有一个结点!
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
28.000ms