-- 作者:lqs820130
-- 发布时间:6/5/2004 11:44:00 AM
-- [求助]为什么我的XML中多个FLASH文件,它只能显示第一个啊?
以下是我的全部源文件,它在表格的2个格里都只显示出123.swf,而第二个swf文件就显示不出来,不知道是什么怎么回事?麻烦各位大哥帮帮小弟。谢谢 flash.xml: <?xml version="1.0" encoding="gb2312"?> <?xml-stylesheet type="text/xsl" href="text.xsl"?> <IntegrateWare> <Page> <Flash>123.swf</Flash> <Text>上面这个Flash是一首羽泉的歌。</Text> </Page> <Page> <Flash>顺序栈的基本操作-1.swf</Flash> <Text>这个是数据结构顺序栈定义的一个swf文件。</Text> </Page> </IntegrateWare> text.xsl: <?xml version="1.0" encoding="GB2312"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/REC-html40"> <xsl:output method="html" indent="yes" encoding="GB2312" /> <xsl:include href="flash.xsl" /> <xsl:template match="/"> <html> <head><title>flash</title></head> <body> <table border="2" bordercolor="black"> <xsl:apply-templates /> </table> </body> </html> </xsl:template> <xsl:template match="Page"> <tr> <xsl:apply-templates select="./Flash" /> </tr> <tr> <xsl:apply-templates select="./Text" /> </tr> </xsl:template> <xsl:template match="Text"> <xsl:value-of select="." /> </xsl:template> </xsl:stylesheet> flash.xsl: <?xml version="1.0" encoding="GB2312"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/TR/REC-html40"> <xsl:output method="html" indent="yes" encoding="GB2312" /> <xsl:variable name="Flash" select="IntegrateWare/Page/Flash" /> <xsl:template match="Flash"> <html> <head><title>flash</title></head> <body> <table border="0"> <tr> <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="694" height="146"> <param name="movie"> <xsl:attribute name="VALUE"> <xsl:value-of select="$Flash"/> </xsl:attribute> </param> <param name="quality" value="high" /> <embed quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="750" height="150"> <xsl:attribute name="SRC"> <xsl:value-of select="$Flash"/> </xsl:attribute> </embed> </object> </tr> </table> </body> </html> </xsl:template> </xsl:stylesheet>
|